| ▲ | Taniwha 6 hours ago | |||||||||||||||||||||||||||||||||||||
I would argue C comes from Algol68 (structs, unions, pointers, a full type system etc, no call by name) rather than Algol60 | ||||||||||||||||||||||||||||||||||||||
| ▲ | adrian_b 2 hours ago | parent | next [-] | |||||||||||||||||||||||||||||||||||||
C had 3 major sources, B (derived from BCPL, which had been derived from CPL, which had been derived from ALGOL 60), IBM PL/I and ALGOL 68. Structs come from PL/I, not from ALGOL 68, together with the postfix operators "." and "->". The term "pointer" also comes from PL/I, the corresponding term in ALGOL 68 was "reference". The prefix operator "*" is a mistake peculiar to C, acknowledged later by the C language designers, it should have been a postfix operator, like in Euler and Pascal. Examples of things that come from ALGOL 68 are unions (unfortunately C unions lack most useful features of the ALGOL 68 unions. which are implicitly tagged unions) and the combined operation-assignment operators, e.g. "+=" or "*=". The Bourne shell scripting language, inherited by ksh, bash, zsh etc., also has many features taken from ALGOL 68. The explicit "malloc" and "free" also come from PL/I. ALGOL 68 is normally implemented with a garbage collector. | ||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||
| ▲ | inkyoto 5 hours ago | parent | prev [-] | |||||||||||||||||||||||||||||||||||||
That is indeed correct. Kernighan in his original book on C cited Algol 68 as a major influence. | ||||||||||||||||||||||||||||||||||||||