History of C
Thompson's B
- Wanted a high-level language but also wanted something small and simple
- Eventually settled on a simplified version of BCPL
"BCPL: A Tool for Compiler Writing and System Programming"
Martin Richards, Proc AFIPS Spring Joint Computer Conference, 34(1969),
pp. 557-566
- omitted a few things
- nested procedures
- some looping constructs
- kept a few important things
- typelessness -- only datatype was a machine word
- array references decomposed into pointer+offset references
- added the
++
and --
operators
- first B interpreter up in 1970
Problems with B
- Machine limit
- Thompson was developing Unix and B on a PDP-7
- PDP-7 had only 8k of memory
- only room for a B interpreter, not a compiler
- Language limit
- Thompson switched to a PDP-11 in 1970
- B's typelessness didn't fit well with PDP-11's hardware support
for several different sizes of datatypes
- Thompson ended up using assembler to port Unix to the PDP-11
The Dawn of C
- Ritchie wrote "NewB"
- compiled rather than interpreted
- type of each variable needed to be declared before being used
- "NewB" shortened to "C" (second letter in BCPL) in 1972
- Documented with
"The C Programming Language" by Brian W. Kernighan and
Dennis M. Ritchie in 1978
- commonly referred to as K&R
Tower of Babel
- For various reasons, C implementations began to drift apart
- new features
- machine differences
- product differentiation
- bugs in compilers
- bad implementations
Standard C
- American National Standards Institute formed ANSI C committee in 1983
- Attempted to codify standard practices and features
- Attempted to break as little code as possible
- Much teeth-gnashing and hair-pulling followed
- ANSI C definition was completed in 1988
Previous,
Next,
Index