[swift-evolution] Remove (!) logical negation operator
Sune Foldager
cyano at me.com
Tue Dec 15 14:31:17 CST 2015
> On 15 Dec 2015, at 21:13, Rudolf Adamkovic <salutis at me.com> wrote:
>
> +1 for clean-up:
>
> • "and" instead of &&
> • "or" instead of ||
> • "not" instead of !
> • if expressions instead of ?!
What you call clean up I would call making needlessly verbose. By the same argument, why not “plus” and “minus”?
> Easier to read, easier to type, easier to understand for beginners.
Symbols are great because they stand out from text, and your variables and class members will be text. There is a reason mathematics uses a lot of symbols as well: It makes it easier to read. There is a learning curve, sure, but the same is the case with text: “and” is that logical or binary and? With symbols, one is && and the other is &.
> As a bonus, it doesn't look like optionals (less !s and ?s).
No, instead it looks like AppleScript :( Catering to beginners is all good, but catering to experienced developers is ultimately more important, I think.
-Sune
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.swift.org/pipermail/swift-evolution/attachments/20151215/517d6007/attachment.html>
More information about the swift-evolution
mailing list