PhobosWatch: manifest => enum
Walter Bright
newshound1 at digitalmars.com
Sun Dec 30 12:41:05 PST 2007
Bastiaan Veelo wrote:
> You can regard me as a newcomer. In my view, enums are often used in
> support of switch statements. If you are loosening up enums so its
> members can be of heterogeneous types, will you be loosening up
> switch/case as well? If not, that would be confusing to me, as you will
> be able to switch on some enums but not on others.
The heterogeneous types for enums would only be for anonymous enums. I
don't think it would make much sense to support case statements of
different types, as the switched value is necessarily of only one type.
More information about the Digitalmars-d
mailing list