Re: why properties are strings instead of enums


Subject: Re: why properties are strings instead of enums
From: Aaron Lehmann (aaronl@vitelus.com)
Date: Tue Jan 23 2001 - 20:35:07 CST


On Tue, Jan 23, 2001 at 06:07:31PM -0800, WJCarpenter wrote:
> BTW, there is one minor irritation that actually goes away and reduces
> complexity if you translate to numbers: "Gee, I can't recall. Is this
> kind of string case sensitive or not?" That just has to be remembered
> in the mapping functions.

Also, you tend to catch more errors (like typos) at compile time when using
enums.

The only problem I see with enums is that they have to be prefixed.
TEXT is definately too ambiguous and conflict with something else in
the source tree. It would have to be FMT_RunType_TEXT or something.
This is not so with strings.

But both are minor issues of programmer convenience. Enums should be
adopted becuase of their speed and elegance as compared to strings.



This archive was generated by hypermail 2b25 : Tue Jan 23 2001 - 20:35:20 CST