Should all enums be immutable?

Trass3r un at known.com
Wed Apr 6 12:42:35 PDT 2011


Am 06.04.2011, 20:40 Uhr, schrieb Simen kjaeraas <simen.kjaras at gmail.com>:
> Yup. In theory, any immutable Foo declared at module scope (and likely
> also those at static class/struct scope) could be elided by the linker
> if it not used anywhere, but Optlink does not do that.

Ok, I guess the hack works by replacing every occurrence of the constant  
identifier in the AST with the initializer part of "enum foo =  
initializer;"?

So there would be no reason to keep enum manifest constants if this  
Optlink bug was fixed?


More information about the Digitalmars-d mailing list