5 ms·
Or just use sexpressions. I don’t mean that flippantly either. I truly believe all of mathematics should utilize them as well. This way you learn the basics in
by shaunxcode 5y ago
Or just use sexpressions. I don’t mean that flippantly either. I truly believe all of mathematics should utilize them as well. This way you learn the basics in grade school and have the syntactic skills needed moving forward.
- zarzavat 5y agoSexprs really suck to write by hand without editor support and a lot of mathematics is done by hand. RPN might be a better starting point for a revolution.
- dhosek 5y agoI remember being confronted with an HP calculator for the first time in college. I understood RPN just fine and knew that I wanted to do, e.g., 6 7 ×, but turning that into actual keystrokes on the calculator was not immediately obvious. I think I ended up doing something like 6 ⎆ 7 ⎆ × ⎆ instead of 6 ⎆ 7 × and got the understandable garbage result. I ended up doing a big chunk of my freshman physics homework doing the math by hand because I didn't own a suitable calculator.
- gumby 5y agoThe rpn calculator does the calculation the same way you would by hand — that’s the point. I’m sorry you had a difficult experience.
- seanmcdirmid 5y agoThey also suck to read. Operator precedence is complicated, but actually increases readability once you are used to them, so much so that the parens seem to get in the way. Which is weird, why could that be? Perhaps the extra tree parsing required by the brain is more than made up for by some kind of visual compression economy going through the eyes?
- agumonkey 5y agowhat about RPL then :) sexprs without pair matching are horrid, but it's a solved problem since a few decades (paredit was made by zeus)
- codr7 5y agoThe only reason for mandatory parens is varargs. https://github.com/codr7/ampl https://github.com/codr7/ampl
- naniwaduni 5y agoTo a human reader, every function is vararg until proven otherwise.
- MrManatee 5y agoHow about relation chaining, such as with inequalities? Is there some nice S-expression notation for, say, "0 < x ≤ y < 1"? In many programming languages you would have to write "0 < x and x <= y and y < 1", but in mathematics this kind of repetition would quickly become very cumbersome.
- School-Cotton 5y agoIf you wanted to avoid this in math notation without being overly verbose you could write x,y \in (0,1) and x <= y.
- MrManatee 5y agoYeah, I suppose this would be acceptable in this instance. But it still repeats x and y, and if x and y were complicated expressions instead of just simple variables, I wouldn't want to repeat them. For example, the proof of the Minkowski inequality in Wikipedia [1] contains a statement of the form "x_1 = x_2 = x_3 ≤ x_4 = x_5 ≤ x_6 = x_7". Except that x_1, ..., x_7 are so complicated that any notation that requires repeating them doesn't feel like a satisfactory notation for "all of mathematics". [1] https://en.wikipedia.org/wiki/Minkowski_inequality https://en.wikipedia.org/wiki/Minkowski_inequality