3 ms·
Algol syntax is weird. Tell me, what does this mean? x = x + 5 Obviously, it's a null statement. It's nonsense. x cannot equal x + 5 because that means 0
by msla 9y ago
Algol syntax is weird.
Tell me, what does this mean?
x = x + 5
Obviously, it's a null statement. It's nonsense. x cannot equal x + 5 because that means 0 = 5 and, therefore, 0 = 1 and, therefore, all mathematics is broken. However, most Algols are completely happy to accept that statement, something we learned was nonsensical way back in our childhoods, as not only valid but as the only way of doing things.
My point is, there is no such thing as a natural syntax. They're all weird. They all have to be learned. Some provide more benefits than others after they've been learned.
(Also: You're only a newbie once. Optimizing for that one-time thing is a bit odd, when you'll spend far more of your life as an experienced programmer.)
- ScottBurson 9y agoThat's precisely why Algol used ':=' for assignment ;-}
- msla 9y agoEh, C/Java is an Algol, too. You know, like how Scala/Scheme is a Lisp.
- ScottBurson 9y agoI think it was Fortran that first used plain "=" for assignment; and C is a descendant of Fortran as much as of Algol. So that might have been a more appropriate reference.