Immutable fields

Stewart Gordon smjg_1998 at yahoo.com
Sun Nov 7 12:40:16 PST 2010


On 03/11/2010 03:06, Daniel Murphy wrote:
> "bearophile"<bearophileHUGS at lycos.com>  wrote in message
> news:iaqbsb$1d30$1 at digitalmars.com...
>> Is it correct for immutable struct fields to act like enum or static const
>> fields? (I don't think so, but I am wrong often):
>
> immutable struct fields can be changed inside the constructor, so they must
> be non-static.
<snip>

Const/immutable struct members are an ugly mess, and a big hole in the 
const system.

http://d.puremagic.com/issues/show_bug.cgi?id=2625

Stewart.


More information about the Digitalmars-d mailing list