Article View: net.lang.c
Article #9426Re: enum function bug?
From: John Gilmore
Date: Mon, 29 Sep 1986 05:08
Date: Mon, 29 Sep 1986 05:08
25 lines
1582 bytes
1582 bytes
I think the definitive word on this has been said already:
Date: 8 Nov 1982 0216-PST (Monday)
From: decwrl!decvax!harpo!npoiv!alice!research!dmr
Subject: enums
Newsgroups: net.lang.c
There has been a lot of grousing about the uselessness of the enum type
in C, most of it justified under the circumstances. The circumstances
are that all versions of PCC that I know of are buggy in their treatment
of this type.
Enums were intended to be entirely equivalent to ints; just a way, really,
of defining names for constants understood by the compiler and subject
to the normal scope rules.
There was a clear choice here: enums as utterly separate collections of atoms,
more or less as in Pascal, or as ways of naming integers. I chose the
latter after some waffling. Unfortunately, some of the waffle batter
got mixed in with PCC and has stayed there.
Dennis Ritchie
--
John Gilmore {sun,ptsfa,lll-crg,ihnp4}!hoptoad!gnu jgilmore@lll-crg.arpa
May the Source be with you!
Technical Details
Message-ID:
<1148@hoptoad.uucp>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!hoptoad!gnuReferences:
<299@sdchema.sdchem.UUCP> <86900054@haddock> <572@opus.nbires.UUCP> <7079@boring.mcvax.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!cbatt!ihnp4!qantel!lll-lcc!lll-crg!hoptoad!gnu From: gnu@hoptoad.uucp (John Gilmore) Newsgroups: net.lang.c Subject: Re: enum function bug? Message-ID: <1148@hoptoad.uucp> Date: Mon, 29-Sep-86 01:08:03 EDT Article-I.D.: hoptoad.1148 Posted: Mon Sep 29 01:08:03 1986 Date-Received: Tue, 30-Sep-86 20:02:54 EDT References: <299@sdchema.sdchem.UUCP> <86900054@haddock> <572@opus.nbires.UUCP> <7079@boring.mcvax.UUCP> Organization: Nebula Consultants in San Francisco Lines: 25