[swift-evolution] Remove (!) logical negation operator

Marc Knaup marc at knaup.koeln
Wed Dec 16 08:13:31 CST 2015


If we use "~" for negation then we'd have to use "~=" and "~==" for
comparison which in turn conflicts with the pattern matching operator.

"?" and "!" for optionals and force unwrap are perfectly fine since the
former is for questions ("is it nil or is it not?") and the latter is an
exclamation mark usually used to draw attention ("yes I'm sure it is
non-nil / not throwing!").

On Wed, Dec 16, 2015 at 3:03 PM, Yichen Cao via swift-evolution <
swift-evolution at swift.org> wrote:

> Instead, I prefer the force unwrap to be another character other than the
> negate operator. It makes no sense to have the negation operator be
> universal and suddenly introduce the force unwrap with the same character.
>
> Yichen
>
>
> _______________________________________________
> swift-evolution mailing list
> swift-evolution at swift.org
> https://lists.swift.org/mailman/listinfo/swift-evolution
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151216/50147560/attachment.html>


More information about the swift-evolution mailing list