enums

bearophile via Digitalmars-d-learn digitalmars-d-learn at puremagic.com
Sat May 31 13:14:58 PDT 2014


Miles Stoudenmire:

> In contrast to those two examples where immutable can be used 
> at compile
> time, what are some other cases where it is necessary to use 
> enum instead of immutable?

By default use enum if you define a compile-time-known value, 
unless it's composed data like an array, etc.

Bye,
bearophile


More information about the Digitalmars-d-learn mailing list