<html><head><meta http-equiv="content-type" content="text/html; charset=utf-8"></head><body dir="auto"><div>I'm against using Nil as it would have a very different meaning than Nil (or Null) in all other C-based languages.</div><div><br>On 06 Jun 2016, at 05:56, Charlie Monroe via swift-evolution <<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>> wrote:<br><br></div><blockquote type="cite"><div><meta http-equiv="Content-Type" content="text/html charset=utf-8">Adding a Nil *type* is a bit different than casting dozen of identifiers to (void*)0...<div class=""><br class=""><div><blockquote type="cite" class=""><div class="">On Jun 5, 2016, at 10:54 PM, T.J. Usiyan <<a href="mailto:griotspeak@gmail.com" class="">griotspeak@gmail.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class="">*please* let us not repeat the mostly avoidable challenging-to-explain-to-newcomers-and-vetarans-alike situation that we had in Obj-C with regard to `nil`.<div class=""><br class=""></div><div class="">nil</div><div class="">Nil</div><div class="">NULL</div><div class="">NSNull</div><div class="">nullptr</div>kCFNull<div class="">__DARWIN_NULL</div><div class=""><br class=""></div><div class="">are the representations of 'don't have' that come to mind. </div><div class=""><br class=""></div><div class=""><br class=""></div></div><div class="gmail_extra"><br class=""><div class="gmail_quote">On Sun, Jun 5, 2016 at 2:39 PM, Charlie Monroe 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">While None is probably the best way to describe the opposite of Any, it would be often mistaken for .None (i.e. Optional) by newcomers to the language.<br class="">
<br class="">
I'd personally prefer calling it "Nil" (capital N), which really means "nonexistent". The same way ObjC had "nil" for "id" and "Nil" for Class. Possibly, to avoid confusion with nil, calling it Null? Though that might get confused with NSNull, once the NS prefix gets dropped.<br class="">
<br class="">
Or "Nothing" as in Scala.<br class="">
<div class="HOEnZb"><div class="h5"><br class="">
> On Jun 5, 2016, at 8:26 PM, Антон Жилин via swift-evolution <<a href="mailto:swift-evolution@swift.org" class="">swift-evolution@swift.org</a>> wrote:<br class="">
><br class="">
> The following names were suggested: NoReturn, Bottom, None, Never.<br class="">
> I would pick None, because it looks like opposite to Any and fits nicely in generic types.<br class="">
><br class="">
> I would prefer the type to be simple, and be implemented as a case-less enum (not a bottom value, as in Haskell).<br class="">
><br class="">
> None should be a usual enum, with no compiler magic except that functions returning None are equivalent to current @noreturn.<br class="">
><br class="">
> Example 1.<br class="">
> let x: None?<br class="">
> // ...<br class="">
> let y = x!<br class="">
><br class="">
> It will trap in runtime not because we discover scary bottom thing, as in Haskell, but because x had value Optional.none at that moment and we asserted otherwise.<br class="">
> We could prove that it is always true in this case, but compiler must be stupid about this.<br class="">
><br class="">
> Example 2.<br class="">
> Compiler should allow including None in structures. Error will show up in constructor, when we will not be able to initialize the field.<br class="">
><br class="">
> Example 3.<br class="">
> None in an enum case makes that case never appear in values of such a type. But compiler can not know about that.<br class="">
><br class="">
> - Anton<br class="">
</div></div><div class="HOEnZb"><div class="h5">> _______________________________________________<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></blockquote></div><br class=""></div></div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>swift-evolution mailing list</span><br><span><a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a></span><br><span><a href="https://lists.swift.org/mailman/listinfo/swift-evolution">https://lists.swift.org/mailman/listinfo/swift-evolution</a></span><br></div></blockquote></body></html>