[swift-evolution] Remove Failable Initializers

Jens Persson jens at bitcycle.com
Wed Mar 9 07:35:10 CST 2016


I think we should not take over this thread with much more of this
discussion but eg this:
let i: Int = Int.init(123)
would not compile if that initializer had a return type of Void rather than
Int. The only initializer I can think of that returns Void is Void() /
Void.init().
/Jens

On Wed, Mar 9, 2016 at 2:15 PM, Tino Heth <2th at gmx.de> wrote:

> Initializers are clearly not void-functions
>
> Really?
> There is no "return ..." in a regular init-method, and every other
> function declared like "init" won't return anything but void — so imho the
> "clearly" is more than questionable:
> Just replace the magic name with anything else, and you have void function.
>



-- 
bitCycle AB | Smedjegatan 12 | 742 32 Östhammar | Sweden
http://www.bitcycle.com/
Phone: +46-73-753 24 62
E-mail: jens at bitcycle.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20160309/2ecf6f03/attachment.html>


More information about the swift-evolution mailing list