3 ms·
In the UK, algebra is first introduced using the equality operator, often with pictures of weight scales and weights, which students are asked to balance. Then
by willtim 10y ago
In the UK, algebra is first introduced using the equality operator, often with pictures of weight scales and weights, which students are asked to balance. Then they are introduced to a concise notation for this, e.g.:
1 + x = 3
Simplification comes later; and it often involves moving terms from one side of the relation to the other, which isn't possible with an assignment operator.
I have no doubt that beginners soon learn any different meaning of "=" over time, but why reuse the operator in the first place? Is it really making it "easier" for the beginner? At least with BASIC the context switch was easier as it was strictly imperative. Python tries to mix in more declarative concepts.
The misuse of the equality operator is only one minor detail, but if people care so little about such details, how can they be trusted to look after the more important ones?
- jerf 10y ago"but why reuse the operator in the first place? Is it really making it "easier" for the beginner" That's a different question than "Has it confused a whole lot of high school students?" "The misuse of the equality operator is only one minor detail, but if people care so little about such details, how can they be trusted to look after the more important ones?" Assuming by "more important ones" you mean more important mathematical ones, that's extremely easy to answer: They can't and they haven't. Very few programming languages look anything like conventional mathematics. Most of the popular programming languages are wildly adhoc from a mathematical perspective. But while some mathematically-inclined folks consider that some sort of damning criticism, they must also address the fact that there are no known practically useful languages that are not at least partially adhoc. Haskell is the closest and the community is well-aware of the places where even it cuts substantial mathematical corners. However, the developing languages that don't cut mathematical corners are only useful on toy problems right now, with the occasional triumphant breakthrough on a very particular problem. It's hard to program in languages where successfully creating a "sort" algorithm is a modestly impressive feat. Compared to the other wild liberties taken relative to conventional mathematics, rewriting two parallel horizontal lines to mean "assignment" is hardly even interesting... after all, assignment itself, as an operation embedded in time, isn't very "mathematical", requiring rather a lot of formal machinery to represent, and goodness help you if you try to formalize what a multi-core system is really doing. It's merely one of the more obvious deviations from math, but arguably the more numerous and profound subtle ones are much more important.
- willtim 10y agoYou sound very defeatist. There is world of difference between how much useful mathematics there is in Haskell compared to Python.
- jerf 10y agoI see you are one of those people who can't stick to a topic for more than one message and constantly change the specific topic of conversation rather than engage in debate. Especially when my own message already carried the idea that Haskell and Python vary substantially in their mathematical content. Carry on then.
- willtim 10y agoYou brought Haskell into the debate (along with many other topics) and I didn't get the impression it was in a positive light, hence my reply. There isn't really anything more to debate. Your position appears to be that such details are "uninteresting", even for an aspiring high-level language like Python, because there are harder problems to solve. I suspect many academics would disagree, which I infer from their language designs.