3 ms·
Kids need an antidote to the brain damage that is standard mathematical notation. I prefer lisps variadic prefix notation, but if you're just doing fixed arity
by noosphr 3mo ago
Kids need an antidote to the brain damage that is standard mathematical notation. I prefer lisps variadic prefix notation, but if you're just doing fixed arity functions without higher order functions than prefix and post fix are as good as each other, and you don't have the dreaded sea of parenthesis.
- pitchlatte 3mo agowhat aspect of school level “mathematical notation” is so bad as to be brain damage inducing?
- cultofmetatron 3mo agoprobably the arbitrariness of it. PEMDAS is more or less burned into my brain at this point but its basically the qwerty of notations.
- pitchlatte 3mo agothat’s not even notation though, that’s a rubric for the order of operations.
- lioeters 3mo agoThe need to remember operator precedence is a consequence of the infix notation syntax.
- antonvs 3mo agoIt’s a tradeoff against lots of irritating silly parentheses.
- lioeters 3mo agoHence Forth.
- WolfeReader 3mo agoclaps
- Someone 3mo agoPostfix doesn’t need parentheses. Prefix technically doesn’t need, either, if you avoid functions taking variable number of arguments and have a grammar that can reliably detect function calls (could be hard if you’re allowing higher-order functions) Even with functions taking a variable number of arguments, you could do it the C way and use the argc, argv trick, giving you * 2 + 3 5 6 7 3 ⇒ (* (+ 5 6 7) 3) ⇒ 54 I think you’d have to be a bit of a masochist to do that, though. That also is why I think varargs functions tend to be rare in bare bones forths. You’d have to write 5 6 7 3 + 3 2 * Using custom names for the varargs functions would help for the 2-argument version.
- pitchlatte 3mo agoi can’t imagine prefix or postfix being easier for most people to understand.