John Cowan <cowan(a)mercury.ccil.org> writes:
Doug McIlroy scripsit:
Various aspects of the language were borrowed
from PL/I, BCPL and Algol
68. ++ and -- were novel operators. The reversal of Algol's assignment
operators (e.g. -= became =-) was eventually repealed in C.
Algol 68, like Algol 60 and Pascal, used := (pronounced "becomes") for
assignment, and the Algol 68 assignment operators were spelled :+=,
:-=, etc. (pronounced "plus and becomes", "minus and becomes", etc.)
My copy of the Algol 68 report says "+:=" and "-:=", so it is
questionable why Ken reversed them, especially since the ambiguity
looks obvious.
Pre-increment operators were already known in Lisp 1.5
long before;
they are now spelled incf and decf in Common Lisp.
AFAICS Algol didn't have them, but every Pascal I know had inc and dec.
--
Christian Neukirchen <chneukirchen(a)gmail.com>
http://chneukirchen.org