the.bay.news

[Pitch] @Init(.ignore): excluding properties from memberwise init

Swift Forums
[Pitch] @Init(.ignore): excluding properties from memberwise init
Hi everyone, SE-0502 (Swift 6.4) improved the memberwise initializer so that less-accessible properties with initial values no longer force the whole initializer down to a lower access level. It's a great improvement, but it only helps when the excluded property happens to be less accessible than its siblings. I'd like to propose closing the remaining gap: a way to exclude a property from the synthesized initializer regardless of access level. Motivation SE-0502 fixes this: struct S { var...

0 comments

Sign in to join the discussion — your thebay.events account works here.

No comments yet.