[Accepted] SE-0422: Expression macro as caller-side default argument

Hello Swift Community,

The review of SE-0422 "Expression macro as caller-side default argument" concluded on February 13th. Feedback was light but positive, with most of the discussion focusing on the existing mechanism (parentheses) used to suppress caller-side expansion for builtins such as #file and #line. The Language Steering Group has opted not to consider changing this existing behavior in the language, and accept this proposal as-is.

Doug Gregor
Review Manager


For clarity, is that “opted not to consider changing this existing behavior in the language as part of SE-0422” or “opted not to consider…in the Swift 6 timeframe, even with an independent proposal”?

Technically, more like the former---the LSG does not consider the likelihood of a change to this behavior for #file/#line/etc. to be high enough that we should prevent SE-0422 from proceeding in codifying it for all macros.

It wasn't an outright rejection of the idea, though: if there were to be an independent proposal, it could be considered on its own merits. At this point, I would not expect for such a proposal to have any change of making it into Swift 6 specifically, because it's outside of the data-race safety goals.