immutable, const, enum

BCS ao at pathlink.com
Tue Apr 28 16:39:14 PDT 2009


Reply to Derek,

> What has surprised me is that immutability is *not* guaranteed. It is
> also just a promise that the coder makes to the compiler. You can
> declare something as immutable and have the program change it. The
> compiler does not actually prevent that happening, it only makes it
> difficult to do. Same with const.
> 

The language has asm blocks can can call C. The only things it can guarantee 
are the same things the OS can guarantee.

If the the language can get at sprintf and sscanf, you can get around any 
const system ever made.





More information about the Digitalmars-d mailing list