[swift-evolution] [Pitch] Unifying init parameters with properties
2th at gmx.de
Thu Apr 14 10:41:14 CDT 2016
There has been a long debate about something similar:
[Proposal Draft] Flexible memberwise initialization <http://article.gmane.org/gmane.comp.lang.swift.evolution/727>
Afair there has been a general agreement that the current boilerplate is ugly, but all suggested alternatives had flaws as well (and init is already a complicated topic).
I'm quite sure a variant of your idea has been discussed, but didn't turn into a formal proposal.
Getting rid of a third of the boilerplate wouldn't be bad, and imho some additional characters could be saved if you skip the type declarations (this would also make it easier to refactor).
The linked proposal had less boilerplate, but much higher complexity.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution