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

Thorsten Seitz tseitz42 at icloud.com
Wed Jan 6 08:48:38 CST 2016


Ok, that makes sense. 

-Thorsten 

> Am 03.01.2016 um 00:24 schrieb Chris Lattner <clattner at apple.com>:
> 
> 
>> 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.
> 
> -Chris


More information about the swift-evolution mailing list