_hyperscript icon indicating copy to clipboard operation
_hyperscript copied to clipboard

Short circuiting logical connectives

Open jkseppan opened this issue 3 years ago • 0 comments

The documentation says "Comparisons can be combined via the and, or and not expressions in the usual manner". I thought the usual manner was to not evaluate the right-hand side when the result is determined by the left-hand side, but apparently not:

https://jsfiddle.net/_jks/rf74xdbe/

If short-circuiting AND and OR is not considered suitable, how about AND THEN and OR ELSE? At least AND THEN is not currently a parse error but it doesn't do short-circuiting evaluation.

jkseppan avatar Aug 08 '22 05:08 jkseppan