19 December 2020

Syntax quibble

Richard Jensen traces the roots of Brian Kernighan's and Dennis Ritchie's C back to Christopher Strachey (nephew to Blooomsburyite Lytton) through SMALGOL and an abandoned project, BCPL.
BCPL is a “bootstrap” language because its compiler is capable of self-compiling. Essentially, a small chunk of the BCPL compiler was written in assembly or machine code, and the rest of the compiler would be written in a corresponding subset of BCPL. The section of the compiler written in BCPL would be fed into the section written in assembly code, and the resultant compiler program could be used to compile any program written in BCPL.
An intermediate step in the development was B.
Scripting languages such as PHP and JavaScript contain bits of programming shorthand that [Ken] Thompson originally developed in order to fit B into the limited memory of the PDP-7. Two examples are the “++” and “--” increment and decrement operators. With only 4k to play around with, shortening “x=x+1” to “x++” saved a not inconsiderable amount of space.

No comments: