[swift-evolution] Proposal: disallow nil in favor of .None

Brandon Knope bknope at me.com
Sun Apr 10 16:14:30 CDT 2016

Just to be a little pedantic (with a point though):

This will actually become .none in swift 3 which actually makes me support this idea even more. 

nil -> .None looks goofy to me
nil -> .none looks just right 

But this is a bold change and is something people are use to from other languages, so I'm sure this will be an uphill battle for you, but "none" does make more sense. Or even renaming nil to none would fit optionals even better 


Sent from my iPad

> On Apr 10, 2016, at 4:53 PM, Paul Young via swift-evolution <swift-evolution at swift.org> wrote:
> Please forgive me if this has already been discussed, but I couldn't find reference to it anywhere.
> My proposal is pretty simple – disallow the use of `nil` and require the use of `.None` instead.
> I would like to understand if there are any technical (or otherwise) reasons for `nil` to remain, or if it simply a remnant of interop with Objective-C.
> Thanks,
> Paul
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution

More information about the swift-evolution mailing list