Algol-style vs C-style semicolons

kjm at ut-ngp.UUCP kjm at ut-ngp.UUCP
Sat Jun 9 07:44:49 AEST 1984


>  ... Look at C's excuse for a grammar, and you will see massive
> amounts of extranea in the production for "statement" whose sole
> purpose in life is to make it possible to avoid having to type a
> semicolon after the } in a compound statement. C therefore does
> *NOT* use semicolon as a statement terminator, no matter how many
> times you see people claim it does.
>
> I think that Huffman coding of tokens is not the best principle
> for language design.
>
>                                                 James Jones

OK, so C effectively has two kinds of statement terminator: ';' and '}'.
So what?  The two tokens terminate two different kinds of objects.

BTW, if C had been done with Huffman coding, wouldn't reserved words be
only one character long? :-)

        Ken "Smurf-shredder" Montgomery
        ...{ihnp4,seismo,ctvax}!ut-sally!ut-ngp!kjm



More information about the Comp.lang.c mailing list