[swift-evolution] [Proposal Draft] Flexible memberwise initialization

Chris Lattner clattner at apple.com
Sat Jan 2 17:24:13 CST 2016

> On Jan 2, 2016, at 2:48 PM, Thorsten Seitz <trsfoo at googlemail.com> wrote:
> One question just occurred to me: do we really need the keyword „memberwise“ anymore? Wouldn’t just using "init(…)“ be sufficient?

It wouldn’t be necessary to make the parser work, but I think we’d want something to make it clear what was intended.  Otherwise, you could write:

	init(a : Int, …) 

when you meant:
	init(a : Int …)

and unfortunate things would happen.  The memberwise keyword also makes it much more clear to the reader what is going on.


More information about the swift-evolution mailing list