|
|
|
|
|
by weinzierl
41 days ago
|
|
The = for assignment is FORTRAN’s fault. In the beginning there was no equality, just assignment, and FORTRAN (being just a FORmula TRANslator after all) made the somewhat dubious decision to use = for that (punch card space being sparse and symbols limited and all). When FORTRAN gained equality it went for .EQ. out of practicality and necessity. Many others followed suit but used the somewhat more pleasant == instead of .EQ.. But it didn’t have to happen that way. ALGOL decided to stick close to mathematical tradition: = for equality := for assignment ("definition") While x := x + 1 is still not clean mathematical notation, I think it wouldn’t have riled up OP’s father as much. If he’d squinted enough, he might even have been able to see little indices below the x’s there. |
|
And now we have all 3 in Python (=, ==, and :=) which makes me sad.