comment token mistake

Mark A Terribile mat at mole-end.and0
Sun May 7 16:15:06 AEST 1989


>>The choice of the 2-token sequence `/*' for starting a comment was a mistake:

> >	printf("%d\n", *a/*b);

> ... I often wonder what the trugurus were thinking when they chose something
> so odd to be a comment-delimiter.

> I mean, the "big-C in column one" of Fortran makes more sense, viscerally,
> if (certainly) not lexically.
 
> Perhaps it [came] from an earlier incarnation of the language ("B", ...)
> or perhaps it was a sarcastic comment [on Pascal's `(*']

It came, I believe, from an earlier language which a few people on the net
may have heard of.  It was called PL/I and it was created, I believe, by some
outfit called the Icky Blue Machine Company.  They had this notion that they
could mix FORTRAN and COBOL and get something useful out of it.  C's struct
and the notation for structs and pointer-to-struct came (I believe) from it;
fortunately C uses nested control structures and avoids the use of labels
for program unit delimiters.

(Actually, PL/I did a remarkable number of things right, and even more almost
right.  It's too bad they couldn't stop with the things they did right, that's
all.)

The PL/I comment convention didn't cause white-space-significance in PL/I
because PL/I lacks the exceptionally rich, token-overloaded operator set of
C.

The PL/I convention is certainly better than FORTRAN's because you can put
comments to the right of data items.  I hope that few would argue that it's
better than COBOL's.  Whether C deserved something better is another question.


			Down with PROC OPTIONS MAIN !
-- 

(This man's opinions are his own.)
>From mole-end				Mark Terribil



More information about the Comp.lang.c mailing list