I always thought Empty would be a good name for it. Matches ‘empty tuple', and accurately describes instances of the type.
Nothing seems to imply non-existence, which seems more in the realm of Never. Empty implies instances can exist, they just can't be meaningfully differentiated.
------------ Begin Message ------------
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.
f: ( input: Int) -> Void
f: ( input: Int) -> Nothing
Instead of saying â€œf takes an Int and returns a Voidâ€� I read this as â€œf takes an Int and returns nothingâ€�.
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.
swift-evolution mailing list
------------- End Message -------------
From James F