[swift-evolution] mandatory "?" suffix for identifiers associated with optional types

Tyler Mandry tmandry at gmail.com
Sun Dec 6 15:56:03 CST 2015


I agree with Adrian here – the problem IMO is the fact that you can do `x <
5` *at all* if x is optional.

Allowing programmers to do `x? < 5` still doesn't make clear what the
actual result of the operation will be if x is nil. In fact, I would
actually *expect* the result of the operation to be a Bool?, not a Bool
which is always false if x is nil.

-- 
Tyler Mandry
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151206/2acb8e0b/attachment.html>


More information about the swift-evolution mailing list