100 Compiler Options and You are Out

California, along with Major League Baseball, is among the institutions that have a policy of “Three Strikes and You are Out.”

I suggest the same rule should apply to compiler writers.

For example, I just tried to port some software that makes use of gcc, the standard Linux C compiler, only to get an error message about a problem with an option.

I then did “man gcc” to review the list of options. As best as I can tell, there are well over a hundred of them.

This is ridiculous. How can any person be expected to make meaningful use of such a superfluity of programming madness.

Let’s do the math. I once read there are about 2**80 atoms in the universe. If there are 100 options to gcc, then are there 2**100 ways of compiling a program, which is 10**20 more times options than there are atoms in the universe!.

If we assign one Richard Stallman to test each possibility, then we need at least 10**20 RMS’s just to test the path flow for options!

GCC Folks: Get your act together. If you can’t come up with a small, reasonable set of options, then I suggest you should leave the compiler game and let the grownups take over.

Four colors suffice to color a map. I’ll give you double that, so can you please cut the number of options down to 8?

3 Comments

  1. Anon
    Posted June 30, 2009 at 10:10 | Permalink | Reply

    The estimated number of atoms in the observable universe is around 10^80, not 2^80.

    Still a lot of compiler options, though.

  2. subgenius
    Posted June 30, 2009 at 22:26 | Permalink | Reply

    And this is a problem……?:p

  3. James_T
    Posted July 2, 2009 at 13:46 | Permalink | Reply

    I’d agree that there are a huge number of options that no normal user would need. However I don’t think there are anything like 2^100 independent combinations as (a) some options imply others and (b) some are “bundles”. I think that 8’s a bit optimistic though (maybe 8-12 general user ones, and then a bunch of specialist things [e.g. running as a cross-compiler] that could be hidden in a separate man page).

    P.S. This page renders abominably in Konqueror (3.5.7) as a column of links is superposed on the text.

    Dave replies:

    I agree that the option space is not as large as I first wrote. However, I believe any programmer has a duty to limit the number of program options to an absolute minimum. That is part of a good design.

    To allow options that cover every possible case is a cop-out, asking the user to wade through a sea of options when they have better things to do.

    For example, gcc has scores of -W options to specify which warnings should be issued. I would use a notion of level, such as “who cares, I just want to run it,” “common-sense,” ” “‘conservative” and “purist – tell me everything.”

Leave a comment

  • Pages

  • June 2009
    M T W T F S S
    1234567
    891011121314
    15161718192021
    22232425262728
    2930  
  • RSS The Wayward Word Press

  • Recent Comments

    daveshields on SPITBOL for OSX is now av…
    Russ Urquhart on SPITBOL for OSX is now av…
    Sahana’s Respo… on A brief history of Sahana by S…
    Sahana’s Respo… on A brief history of Sahana by S…
    James Murray on On being the maintainer, sole…
  • Archives

  • Blog Stats

  • Top Posts

  • Top Rated

  • Recent Posts

  • Archives

  • Top Rated