C and Algol 68

Skip to first unread message


Jun 18, 1988, 5:23:34 AM6/18/88
Practically everything ok@quintus cites as proving that C does not
descend from Algol 68 is true, yet there was influence, much of
it so subtle that it is hard to recover even when I think hard.
In particular, the union type (a late addition to C) does owe to A68,
not in any details, but in the idea of having such a type at all.
More deeply, the type structure in general and even, in some strange
way, the declaration syntax (the type-constructor part) was inspired by A68.
And yes, of course, "long".

Mostly, of course, C is Thompsonized BCPL (that is, B) with types.
You don't have to look too hard to find PL/1 and Fortran, either.

Dennis Ritchie

Steven Ryan

Jun 21, 1988, 4:04:26 PM6/21/88
I detect echoes of +:= *:= et cetera.

A central principle in programming language design is don't look at previous
work and avoid the landmines.

A case in C was =+ =* =- and so forth. If the Revised A68 report chapter 9
had been studied with care, the ambiguity would have been immediately noticed.

A case in Ada had to do with what every they call structure display. The long
form is type-name(member1,...,membern) and short form is (member1,...,membern).
If the short form only has one member, (member), it is ambiguous with a
parenthised expression. Again the A68 directly dealt with this problem by
requiring a collateral clause to have zero or more than one unit.

One of the nicest things about the Revised Report was a complete and formal
definition. It might take a bit work, but every question could be resolved.

Why bother? Isn't much more fun to let each compiler have its own
interpretation? comp.lang.c and comp.lang.ada consume a large bandwidth as
people try to decide what is and is not legal and what it means.

(I take it back--I have been informed C does have a formal definition:
"Whatever PCC does on a VAX.")

Reply all
Reply to author
0 new messages