[Accepted] SE-0347: Type inference from default expressions

Hello Swift Community,

The review of SE-0347 "Type inference from default expressions" ended on April 5, 2022. The Core Team has decided to accept the proposal.

Feedback was light but positive. Two main concerns came up:

  • That this feature might not compose with default arguments for generic parameters, should that feature come in the future. The Core Team agrees with the author's analysis that default arguments for generic parameters could be introduced later without affecting either feature.
  • That this feature could cause confusion between the type of the parameter and the type of the default argument. The Core Team understands this position, but felt that the existing interpretation of default arguments encompasses this use as well: default arguments provide a value (and now a type) when used, but when one provides a value it is as if the default argument did not exist.

Thank you everyone who participated in the pitch and proposal review.

Doug Gregor
Review Manager

22 Likes