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.

Tino
_______________________________________________
swift-evolution mailing list
swift-evolution@swift.org
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to