Some people might not have made the connection, but by and large programming languages make this mistake too. All the major ones are using the = glyph for assignment.
Some people might not have made the connection, but by and large programming languages make this mistake too. All the major ones are using the = glyph for assignment.
Although the assignment operator and the equals operator are similar there is a preference to have the equals sign retain its original meaning.
1. https://www.jsoftware.com/help/dictionary/d000.htm 2. https://www.jsoftware.com/help/dictionary/d001.htm
(I wouldn't call J's = "the mathematical sense", either, as I don't know any mathematicians who would say that = is an operator that evaluates to 1 when the two sides are within 2⁻⁴⁴. The mathematical sense is merely a statement of fact, e.g., "x+10=y+10", when x is 5 and y is unknown, should mathematically result in knowing that y is also 5. Wolfram is the only language I know offhand that does anything like this.)
Forth, Lisp, Scheme, APL, R, Logo, Cobol, and assembly all have a variable assignment syntax that doesn't use the "=" character at all. Only 2 of them even use the form "varname SYMBOL expression".
I probably wouldn't recommend assembly language as a teaching language, but you have to admit no assembly programmer ever confused LDA and CMP.
Foo = bar and 1 = 1 are equivalent in my mind.
How do you square that circle, "fine" for assignment; wrong for equality.
Depending on which programming language you're using, "foo = bar" can mean either "make foo now equal to what bar is" or "is foo equal to bar now?". Neither one is the same as in mathematics, which is "foo is categorically equal to bar".
Consider:
foo = 1
bar = 2
foo = bar
In mathematics, this would be a logical contradiction, and either you'd realize you made a mistake, or you'd jump back to the step where you said "now assume ..." and say "now we've proven this can't be true".In programming, this is perfectly valid, and means "ok, ignore what I wrote just 2 lines ago, and now make foo equal to 2, also".
You say you think it means "the LH var equals the RH value assigned to it", but you don't say what you think it means to assign to the literal 1.