On 6 Jan 2009, at 19:59, Quincey Morris wrote:


I'm sure someone will jump in and correct me if I'm wrong about this,

Jumping in....

but (in answer to the implied "why?" in Graham's post) my recollection is that:

-- 'typedef' was added to C later in its life, so originally 'enum XXX' was the only way to refer to an enum type you'd already defined. ["Later" in this context would be somewhere in the mid-1970s.] Or perhaps it was just that some C compilers didn't implement 'typedef' in olden days.

enum was added to C after typedef. When I first started learning C in the mid 80's (from K & R first edition), typedef already existed as a keyword but enum didn't. In fact, I don't think enum became an official part of C until the first ANSI standard was published.

However, your whole discussion still makes sense with the word struct substituted for enum and I'm sure struct predates typedef.



_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to