The Origins of the "++" and "--" Operators

  • Relatedly, the PDP-11 addresses modes are post-increment and pre-decrement in order to allow programming the PDP-11 as if it were a stack machine, with a register pointing at the β€˜top’ of the stack (i.e. lowest address). (Reference: Computer Engineering: A DEC View of Hardware Systems Design)

  • I think this is about pre/post increment/decrement being inspired by PDP-7, not about C pointer arithmetics being inspired by PDP-11 ISA addressing modes[1].

    https://en.wikipedia.org/wiki/PDP-11_architecture#General_re...

  • Auto increment makes a lot of sense in assembly language, for example when accessing memory so I can assume that C followed assembly

  • I've also seen n++ in pedagogical Analysis for the successor function.

  • [dead]