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

Sune Foldager cyano at me.com
Tue Dec 15 13:49:05 CST 2015


> On 15 Dec 2015, at 17:05, Tommy van der Vorst via swift-evolution <swift-evolution at swift.org> wrote:
> 
> I *do* see negative effects of removing it: ! is part of virtually all programming languages currently in use, any decent programmer is accustomed to it and read it like 'not' in their head anyway. Removing would definitely confuse newcomers to the language. 

I completely agree. While it *is* a bit weird to use the same symbol for forced unwrap and its more traditional use as boolean negation, removing the one virtually all other languages have is not the answer. If we do that, why not also ~ for binary negation, || and && and even + and -.

It’s always a balance between verbosity, “natural language”-ness and terseness. It’s not always easier to read code that’s very verbose, and I’m sure we don’t want Swift to be like AppleScript.

-Sune

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/c38bb78f/attachment.html>


More information about the swift-evolution mailing list