[swift-evolution] [Draft] Change @noreturn to unconstructible return type
brent at architechies.com
Mon Jun 6 03:16:14 CDT 2016
> 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.
I don't think Nil or Null are good answers here. Whatever their dictionary definitions, they have specific meanings to programmers.
(Actually, I could kind of see *lowercase* `nil`—the nil literal—being an okay option, if only because it would look bizarre. In that case, it would be indicating a lack-of-type. `Nil`, though, looks like it is the type of `nil`, and in many languages it is.)
> Or "Nothing" as in Scala.
I think `Nothing` suffers from a slightly less serious case of `None`: it looks like a sensible alternate word for `Void`. If you heard someone say a function "returns nothing", would you think that means it doesn't return, or that it returns but doesn't return any data?
More information about the swift-evolution