4 ms·
Features of BCPL (Martin Richards, 1967): * used { } instead of BEGIN and END keywords * single type called WORD * declared variables with LET * used /
by cgrubb 14y ago
Features of BCPL (Martin Richards, 1967):
* used { } instead of BEGIN and END keywords
* single type called WORD
* declared variables with LET
* used // style comments like C++
Features of B (Ken Thompson, 1969):
* used = instead of := for assignment
* variables could be declared AUTO or STATIC
* semicolons as statement terminators
* ++ and -- incrementors/decrementors in prefix and postfix position
Features of early C (Dennis Ritchie, 1970)
* two types: int and char
* struct introduced in 1973
* /* */ style comments from PL/I
* && and || operators with short-cut semantics
- pjmlp 14y agoSadly proper arrays and strings were left somehow along the way.
- kps 14y agoBCPL vectors seem to be the same as C arrays, no? dmr wrote at http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.html http://cm.bell-labs.com/cm/cs/who/dmr/bcpl.html that “C was invented in part to provide a plausible way of dealing with characters when one begins with a word-oriented language. [...] BCPL later found a solution better, on its own terms, by providing an operator (%) analogous to its !, such that v%i designates the i-th character in a vector. However, the earliest BCPL applications tended not to process packed characters in vectors, but to spread them out early into one character per word, process, and then pack them again if necessary.”
- pjmlp 14y agoI meant about the design decision to ignore what other system programming languages were already offering on those days. Algol and PL/I already offered what I consider proper arrays and string types. The performance argument about bounds checking is stupid, because any proper compiler offered the possibility to disable bounds checking for code regions. Sadly the decision taken was another one with the security consequences everyone was to endure with software written in C. At least C++ offers a way out for the developers that embrace STL and similar libraries.