Lilliput, Blefescu and {} indentation

utzoo!decvax!harpo!ihps3!ihuxe!aark utzoo!decvax!harpo!ihps3!ihuxe!aark
Mon Oct 25 11:29:01 AEST 1982


Has anyone in this newsgroup ever read "Gulliver's Travels?"  In the
island of Lilliput, Gulliver is told that some time in the past,
the emperor decreed that all the subjects must crack their eggs
at the little end.  Many, however, preferred to crack eggs at the
big end, and stalwartly refused to obey the decree.  War ensued,
and the Big-Endians were eventually expelled to the neighboring
island of Blefescu, leaving the Little-Endian partisans in control
of Lilliput.

Lately this newsgroup has been deluged with articles telling why
one standard for placing braces in C code is better than another.
There are basically four camps, distinguished as follows:

if (expr) {                     if (expr) {
    statements                      statements
}                                   }

if (expr)                       if (expr)
    {                           {
    statements                      statements
    }                           }

I'm not Jonathan Swift, so I can't write some biting satire about
how useless the "C Brace Question" (read: "Big-End - Little-End
Question) is.  If a style standards committee feels they must
dictate which of the above to use, I would recommend that they
print out this article, tack it to the wall, and throw a dart at it.
If the dart lands within one of the above examples, put that in the
standard; if it lands elsewhere, don't mention where to put braces
at all.  (Yes, I know there's a lot more area to hit outside the
examples than inside them.)

I just wish people would discuss some more substantial issues in this
newsgroup.

I'm not going to tell you the camp to which I belong,

Alan R. Kaminsky
Bell Laboratories, Naperville, IL
...ihps3!ihuxe!aark




More information about the Comp.lang.c mailing list