PhobosWatch: manifest => enum

Steven Schveighoffer schveiguy at yahoo.com
Fri Dec 28 06:52:11 PST 2007


"Walter Bright" wrote
> Jérôme M. Berger wrote:
>> :(
>
> Yeah, I figure I'll get fricasseed over that one. The most compelling 
> argument is that we already have 3 ways to declare a constant, adding a 
> fourth gets very difficult to justify.

Whether you use enum or manifest or some other keyword, you are already 
adding a fourth method, as Jerome pointed out.  But regardless, it is not so 
much the adding of the new method as it is the shoehorning of the word enum 
into something it was not meant to be.  Enum stands for enumeration, and is 
traditionally used to define a new type, which can only be one of several 
values.  In this case, we don't want a new type.  We want to declare a 
read-only value of an already defined type.

> As opposed to a minor extension to enums.

Um... this is not minor :)  This is a complete redefinition of what enum 
means.

-Steve 





More information about the Digitalmars-d mailing list