Gerald S. Williams wrote: > Compare this to the order of evaluation in the current > equivalent (parentheses for clarity only): > (x and y) and 1 or 0 > > or if you prefer: > ((x and y) and [1] or [0])[0] I was thinking that the semantics of "and" & "or" are the replacement for the trinary operator? Since these operations always return the last evaluated subexpression (the same subexpression that short-circuits the evaluation), they can be used as Gerald outlines above. It seems very consistent, logical, and understandable to me; but then again, I love the semantics of list compressions. ;) Thanks, -Shane Holloway
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4