Proposal: Enum types as valid With-statement parameters

xs0 xs0 at xs0.com
Fri Jul 21 01:26:16 PDT 2006


> Walter: how difficult would it be to allow named Enum types as valid 
> With-statement parameters?  When named Enums are used in tandem with 
> constructs such as Switch, this could save quite a lot of typing, and is 
> still perfectly clear when reading code.
> 
> -- Chris Nicholson-Sauls

Actually, there's no need for that with(). If the switch value of of a 
named enum type, the corresponding constants could automatically become 
available for cases. It could be even better, if no other value was 
allowed (except default), as it's almost by definition a mistake?


xs0



More information about the Digitalmars-d mailing list