3 ms·
I think elaborate syntax is in itself a "hundred year mistake". I've been messing about with a language that uses Reverse Polish Notation (like Forth) for a bi
by carapace 7y ago
I think elaborate syntax is in itself a "hundred year mistake". I've been messing about with a language that uses Reverse Polish Notation (like Forth) for a bit, so of course there's no operator precedence at all. Also the distinction between short-circuiting Boolean combinators and "mathematical" Boolean operators is obvious, the former require a quoted function as one of their inputs (to conditionally execute) while the latter just take two ints (or bools or whatever, primitive values rather than quoted functions).
In a crude type notation:
bool -> (... -> bool) -> bool
vs.
int -> int -> int
- Twisol 7y agoYou could go the next step for symmetry and make _both_ operands quoted functions, at which point you're just working in a lazy language. :D
- carapace 7y agoThat's actually how I did it at first, but then I realized that it was silly because you always run the first quoted function right off anyway so it's cleaner to just require a Boolean value. (There's a way using Category Theory to firm up that assertion into proper math, but I'm not good enough at CT to do that.) :D