<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div><blockquote type="cite" class=""><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">So you would you be happy if failable inits were declared like this:</div><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;"><br class=""></div><blockquote class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px; margin: 0px 0px 0px 40px; border: none; padding: 0px;"><div class="">init() -&gt; self? {}</div></blockquote></div></blockquote><div><br class=""></div><div>Not really — afaics, the signature ought to be</div><div>static init() -&gt; Self? {</div><div>//…</div><div><span class="Apple-tab-span" style="white-space:pre">        </span>return self</div><div>}</div><div>for maximum consistency ;-) (oh, wait: self is available in the body, so it can't be static… it's even more special than that :-)</div><div>The status quo is definitely convenient, and before this thread, I didn't brood over possible flaws it might have; now, 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.</div><br class=""><blockquote type="cite" class=""><div class=""><div class="" style="font-family: Helvetica; font-size: 12px; font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-stroke-width: 0px;">Unfortunately, Swift decided to make init() a special case thing. It's also the only function type that has special rules around accessing properties, the only one that cannot be named differently, the only one that has special rules around recursing or forwarding to other init() calls</div></div></blockquote>True, but I think those rules can't be removed (maybe it's possible to generalize some; "required" is a candidate for this).</div><div><br class=""></div><div>Apparently, getting init right is tougher than it seems at first sight (I'd love to see a brilliant answer for the "<span style="font-family: 'Helvetica Neue';" class="">make class initialization complexity more progressively disclosed" thread that magically simplifies the whole thing ;-</span>)</div><div><br class=""></div><div>Tino</div></body></html>