My initial stance several months ago was that initializers should throw
instead of returning nil, but I've changed it as a result of the error
handling rationale (same document as Chris linked).
Specifically this section, taken from ErrorHandlingRationale.rst:
Simple domain errors
A simple
+1 for keeping failable initializers. Error handling should be reserved for
errors and not be used for control flow or logic.
-Thorsten
> Am 27.12.2015 um 18:11 schrieb Chris Lattner via swift-evolution
> :
>
>> On Dec 27, 2015, at 5:22 AM, Manfred Lau via
> How do you guys think of that?
Makes sense.
Failable init has its roots in Objective-C, throws is a better fit for Swift —
but it is not trivial to change all Cocoa class to throw instead of returning
nil (at least in theory — most likely many classes don't have that many reasons
for a