3 ms·
Wirth doesn't mention math as inspiration because it is obvious. Surely he derived the syntax from ALGOL, that is no secret, but it was his choice to do so and
by weinzierl 3y ago
Wirth doesn't mention math as inspiration because it is obvious.
Surely he derived the syntax from ALGOL, that is no secret, but it was his choice to do so and not invent something unconventional like Thompson and Ritchie did.
In addition to that I find it quite telling that ALGOL's designers were all mathematicians while Thompson and Richie were Electrical Engineer and Physicist respectively.
I don't know why you put equals by definition into quotes as if I had invented that and also why you falsely claim that it is not listed on the Wikipedia page you referenced. It is there with := as symbol in the section about equality.
If you need another reference:
":= (the equal by definition sign) means “is equal by definition to”. This is a common alternate
form of the symbol “=Def ”, which appears in the 1894 book Logica Matematica by the logician
Cesare Burali-Forti (1861–1931). Other common alternate forms of the symbol “=Def ” include def
“=” and “≡”, the latter being especially common in applied mathematics." [1]
Sure, there are alternative forms but := is what was taught in Germany and Switzerland in schools and university when I was there and I'm pretty sure also when Niklaus Wirth was there.
[1] https://www.math.ucdavis.edu/~anne/WQ2007/mat67-Common_Math_Symbols.pdf https://www.math.ucdavis.edu/~anne/WQ2007/mat67-Common_Math_...
EDIT:
In Niklaus Wirth's own words:
"A notorious example for a bad idea was the choice of the equal sign to denote assignment. It goes back to Fortran in 1957, and has blindly been copied by armies of language designers. Why is it a bad idea? Because it overthrows a century old tradition to let “=” denote a comparison for equality, a predicate which is either true or false. But Fortran made it to mean assignment, the enforcing of equality. In this case, the operands are on unequal footing: The left operand (a variable) is to be made equal to the right operand (an expression). x = y does not mean the same thing as y = x."
—Niklaus Wirth, Good Ideas, Through the Looking Glass