[swift-evolution] More verbose logical operators

Keith Smiley keithbsmiley at gmail.com
Thu Dec 3 23:01:39 CST 2015


There was another post about this earlier today as well:

https://lists.swift.org/pipermail/swift-evolution/2015-December/000032.html

--
Keith Smiley

On 12/04, Bee wrote:
> Hi all,
>
> Swift is said to be a verbose and easy to read programming language.
> However, I see Swift is still using cryptic symbols for logical operators.
>
> ! for not
> || for or
> && for and
>
> Here I propose a new logical operators that are more swiftish.
>
> 'not' for not
> 'or' for or
> 'and' for and
>
> So, instead of:
>
> if !foo1 || foo2 && foo3 { … }
>
> we could write it as:
>
> if not foo1 or foo2 and foo3 { … }
>
> which is much more readable because it's less cryptic.
>
> What do you think?
>
> Thank you.
>
> Regards,
>
> --
> -Bee-

> _______________________________________________
> 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