<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=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jul 21, 2016, at 11:59 AM, Xiaodi Wu <<a href="mailto:xiaodi.wu@gmail.com" class="">xiaodi.wu@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">Quite frankly, I think the ship has long sailed for renaming Void.</div></div></blockquote><div><br class=""></div><div>Agree. I’m not advocating change, just stating things that should be considered if anyone wants to propose it.</div><br class=""><blockquote type="cite" class=""><div class=""><div dir="ltr" class=""><div class="gmail_extra"><br class=""></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Thu, Jul 21, 2016 at 11:52 AM, Matthew Johnson via swift-evolution <span dir="ltr" class=""><<a href="mailto:swift-evolution@swift.org" target="_blank" class="">swift-evolution@swift.org</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><br class="">
<br class="">
Sent from my iPad<br class="">
<span class=""><br class="">
> On Jul 21, 2016, at 11:42 AM, Daniel Steinberg via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
><br class="">
> This may be a silly question - given that one of Swift’s design principles is to be a language for new programmers and for APIs to read like English phrases, should we replace the typealias of Void for the return type () with Nothing.<br class="">
<br class="">
</span>Nothing was one of the names considered for the bottom type that replaces @noreturn (<a href="https://github.com/apple/swift-evolution/blob/master/proposals/0102-noreturn-bottom-type.md" rel="noreferrer" target="_blank" class="">https://github.com/apple/swift-evolution/blob/master/proposals/0102-noreturn-bottom-type.md</a>). I think it would be confusing to rename Void to Nothing.<br class="">
<br class="">
If we consider renaming it Unit is the obvious way to go (<a href="https://en.m.wikipedia.org/wiki/Unit_type" rel="noreferrer" target="_blank" class="">https://en.m.wikipedia.org/wiki/Unit_type</a>)<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
><br class="">
> So<br class="">
><br class="">
> f: ( input: Int) -> Void<br class="">
><br class="">
> becomes<br class="">
><br class="">
> f: ( input: Int) -> Nothing<br class="">
><br class="">
> Instead of saying “f takes an Int and returns a Void” I read this as “f takes an Int and returns nothing”.<br class="">
><br class="">
> I’ve been using f:(input: Int) -> () because it’s easier to explain than Void to non-experienced programmers. Experienced programmers have no problem with Void. But Void seems to be something we’re using just because we have for a while - like x++ and C-style for loops.<br class="">
><br class="">
> Best,<br class="">
><br class="">
> Daniel<br class="">
> _______________________________________________<br class="">
> swift-evolution mailing list<br class="">
> <a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
> <a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
<br class="">
_______________________________________________<br class="">
swift-evolution mailing list<br class="">
<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a><br class="">
<a href="https://lists.swift.org/mailman/listinfo/swift-evolution" rel="noreferrer" target="_blank" class="">https://lists.swift.org/mailman/listinfo/swift-evolution</a><br class="">
</div></div></blockquote></div><br class=""></div></div>
</div></blockquote></div><br class=""></body></html>