[Accepted with Modifications] SE-0328: Structural opaque result type

Hello Swift Community,

The review of SE-0328: Structural opaque result types has completed. Feedback was positive, and the core team has accepted this proposal with modification.

During the review there were two main areas of discussion:

  • The spelling of optional types. The proposal leaves this as (some P)? even though some P? is more succinct and could potentially be allowed as sugar. The core team agrees with this more conservative approach, which could be revisited later after more experience with the feature.
  • The use of some in "consuming" rather than "producing" position when returning function types i.e. f() -> (some P) -> Void. Discussion of other uses of the some keyword is ongoing, and there was concern about potential conflict with those future uses. Since the use of opaque result types in consuming position is not especially useful (such functions are uncallable in all but a few circumstances) the core team has decided to subset out this use, requiring opaque result types only in the return value of returned function types for now.

Thank you to everyone who participated in the review!

Ben Cohen
Review Manager