AND and OR in if statement

Claude Pache claude.pache at gmail.com
Wed May 25 10:31:56 UTC 2016


> Le 25 mai 2016 à 03:29, kdex <kdex at kdex.de> a écrit :
> 
> IMHO, the current operators `&&`, `&`, `||` ,`|` are the cleanest implementation of `and` and `or` that I could think of.

I don’t think so: It is not ideal that the longest forms, `&&` and `||`, are by far the most current ones. But this is history that we cannot change.

Having to sets of logical operators, `&&`/`||` versus `and`/`or`, **with different precedence**, is very useful in idiomatic Perl, where they are typically used to express control-flow. But much less so in idiomatic JS.

—Claude



More information about the es-discuss mailing list