Grouse: What's the point of enum?

Henry Spencer henry at zoo.toronto.edu
Fri Apr 19 01:34:18 AEST 1991


In article <gu1k13w164w at cellar.UUCP> rogue at cellar.UUCP (Rogue Winter) writes:
>If the names given to enumerated values cannot be printed, why do they exist? 

Rumor hath it that they were an implementation kludge after somebody ran out
of symbol-table space in the preprocessor and couldn't expand it because of
address-space limitations on an old machine.  The fast answer is that, as
you have surmised, they aren't good for much.  They don't fit the rest of
the language very well, and they were never thought through very clearly
until X3J11 tried to figure out what they should mean in ANSI C... at which
point it was discovered that existing implementations varied so much that
it was impossible to do anything ambitious with them.  I'm told that there
was considerable sentiment for leaving them out of ANSI C entirely.

Just ignoring them is the simplest thing to do.
-- 
And the bean-counter replied,           | Henry Spencer @ U of Toronto Zoology
"beans are more important".             |  henry at zoo.toronto.edu  utzoo!henry



More information about the Comp.lang.c mailing list