Date: Thu, 17 Oct 1996 08:22:10 -0500 (EST) From: "John S. Dyson" <toor@dyson.iquest.net> To: phk@freebsd.org Cc: hackers@freebsd.org Subject: Re: enum considered bad ? Message-ID: <199610171322.IAA04122@dyson.iquest.net> In-Reply-To: <2022.845535270@critter.tfs.com> from "Poul-Henning Kamp" at Oct 17, 96 08:54:30 am
next in thread | previous in thread | raw e-mail | index | archive | help
> > > I've noticed that "enum" is hardly ever used in C programs, is this > because people consider it a bad idea or because they havn't really > got the swing of it ? > I think that it is mostly habit. In C++, enum's are nice due to extra typechecking. ANSI-C does not afford typechecking of enums. Unfortunately an enum is roughly the same as an int in ANSI-C and misuse of an enum is easy (about the same as a #define.) John
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199610171322.IAA04122>