by codeflo · 2y ago · 0 comments
This hints at a failure of math education.
As an analogy, many (usually, but not always, weaker) programmers still have magic ideas about booleans and comparison operators, and write nonsensical stuff like if (a == true). When you ask them, it's invariably that in their mind, there's mystic connection between comparison operators and if statements.
I literally… never mind.
It doesn't have to be mystic. It's perfectly fine to design a language that works like this. It wouldn't be a good language, but it would be possible.
Just like PHP didn't use to support constructs like `f(10)[2]`, that used to be a syntax error. So you needed something like `x = f(10);` first, before accessing `x[2]`.
If you saw that kind of construction with the intermediate variable, you might also accuse the programmer of imagining mystic connections.