[swift-evolution] [Proposal] Partial initializers

Matthew Johnson matthew at anandabits.com
Wed Jan 20 09:43:10 CST 2016

> On Jan 19, 2016, at 11:05 PM, Brent Royal-Gordon <brent at architechies.com> wrote:
>> The only difference is that partial init can set `let` members, correct?
> The other difference (unless I'm wrong) is that an init function can be called again after initialization is complete. In other words, an `init func` is an actual method that can also be called during initialization; an `init <name>` is a sort of pseudo-method that can *only* be called during initialization.

This is correct pretty much correct.  I don’t really think of `init <name>` as a pseudo-method but you could look at it that way.  Regardless of how you think of it, the current proposal suggests using `name.init()` syntax when calling either form during initialization.

I know you want to be able to reference previously initialized members in a partial initializer.  I still have an open mind about this, but want to see more community and core team input before I consider it further.

Aside from that, how do you like the changes in this draft in general?  


> -- 
> Brent Royal-Gordon
> Architechies

More information about the swift-evolution mailing list