[swift-evolution] Remove Failable Initializers
David Owens II
david at owensd.io
Wed Mar 9 14:35:35 CST 2016
> On Mar 9, 2016, at 12:02 PM, Tino Heth <2th at gmx.de> wrote:
> I have to admit that initialization in Objective-C not only had the downside of being more cumbersome, but also the advantage of being simpler and more lightweight.
It is more cumbersome because it's significantly more powerful and tied to a class-hierarchy. That power also makes it "unsafe". Like most recent languages, Swift has gone the route of combining both allocation and initialization into one unifying concept. This is primary source of the init() constraints, limitations, and complexity. There's a lot to get right when your stance is that a type must be fully initialized before returning it to the caller.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the swift-evolution