enum, no trailing comma?

Joe Wells jbw at zeb.uswest.com
Sat Aug 25 09:16:05 AEST 1990


In article <13620 at smoke.BRL.MIL> gwyn at smoke.BRL.MIL (Doug Gwyn) writes:

   Yes, the syntax does not permit a trailing comma after the list.
   This was the result of an explicit vote in X3J11.  The basic argumentation
   was that optional trailing comma after initializer lists was required by
   the existing practice and had been deliberately intended (presumably to
   facilitate automatic generation of such lists, although I find that a weak
   reason), so that little bit of sloppiness had to be supported by the
   standrad; however, it was generally felt that there was no need to extend
   the syntactic sloppiness to the case of enumerator lists also.

Why are trailing commas sloppy?  And even if they are "sloppy", what's
wrong with that?  Shouldn't you give the programmers what they want in
this case?

C uses trailing semicolons after expression statements.  Pascal uses
semicolons between statements.  How many people here prefer Pascal's less
"sloppy" semicolons?

-- 
Joe Wells <jbw at bu.edu, jbw at uswest.com>



More information about the Comp.lang.c mailing list