Change some keywords and enum manifests?

Michel Fortin michel.fortin at michelf.com
Tue Apr 27 20:34:01 PDT 2010


On 2010-04-27 20:10:59 -0400, bearophile <bearophileHUGS at lycos.com> said:

> With a smart compiler+linker there is no need to tell apart the two cases:
> 
> enum int x = 10;
> immutable int y = 20;

Except when building a dynamic library.

Personally, I find it comforting to know for sure an enum value will 
never waste any space, optimization or not. But the semantic difference 
is quite subtle, its like a third kind of const, which makes the 
language harder to understand.

-- 
Michel Fortin
michel.fortin at michelf.com
http://michelf.com/




More information about the Digitalmars-d mailing list