IMPORTANT: Evolution discussion of the new DSL feature behind SwiftUI

I want to express how much I appreciate everyone's candid, thoughtful and passionate input on this thread. I think the discussion here has been very good.

Aside from the function builders feature (now being discussed) all of the language features that are used by SwiftUI have been either gone completely through the evolution process or are close to being wrapped up:

There's probably others I'm missing, but they all went through the evolution process. Even the priority of proposing SE-0254 was indirectly motivated by SwiftUI, although it ultimately turned out to not be necessary (but a good addition to the language nevertheless).

Property wrappers is an excellent case where the evolution process played a crucial role in shaping a feature. While the proposal hasn't completed the full evolution process, it has gone through a review and multiple rounds of pitches, and the Core Team had already decided and publicly stated that the feature was going to be eventually accepted into Swift. What's in Xcode 11 is a preview of a feature, and the evolution review process needs to focus on deciding the final details. Even the renaming of the feature from property delegates to property wrappers was an outcome of the evolution discussion.

Regarding functional builders, I think it's important to dispel a potential misconception that this has been sitting in a cask for an extended period of time awaiting some public reveal:

Function builders was not a planned “surprise reveal”. Function builders emerged as a fairly recent solution to a problem after lots of design iteration and trial and error.

So why is it function builders coming up now on Swift Evolution:

  1. It was recently developed, and all evolution proposals require an implementation. A change of this magnitude certainly needs to be put through its paces to demonstrate that it works and is cogent and cohesive.

  2. We (on the Apple side) also got very close to WWDC and had a lot of plates to juggle. At some point it was so close to WWDC that running the pitch before WWDC wasn't realistic. We were also hammering out the details for a proposal until very recently.

I think pretty much everyone — including the folks at Apple — would have preferred to have had time to bring this to evolution before having it in beta tools. That said, the tools are still previews of a yet-unreleased stuff and details can change. It also probably helps the discussion to be able to see how the feature is used by SwiftUI.

I think the following statement from @GetSwifty summarizes what's going on well:

If anything, a feature like this really needs the oversight of the evolution process to ensure the right short-term and longer-view decisions are being made.

It is true that...

  • The Core Team are the ultimate deciders in what goes into Swift
  • Many of the folks on the Core team work at Apple and were involved in the conception of this feature

... but it also remains true that the evolution process remains an invaluable part of the evolution of Swift and will play an important role in the evaluation of this feature.

79 Likes