|
|
|
|
|
by CookiesOnMyDesk
933 days ago
|
|
Do you use a well named function like and(), or do you use the double ampersand (&&) syntax trick? What about a not() function, or the exclamation mark syntax trick (!)? :) Every use of operators can be considered a syntax trick until it becomes common, which is what the author hopes will happen to ~~ |
|
That's blatantly false for strict languages, like JavaScript. For a function, all arguments are evaluated before the function is evaluated. For operators this is not true. On the and-case, the second argument is only evaluated if the first one evaluates to something true-ish.
You can only use this supposed and()-function, if you pass closures instead of values and not every language has those.