Immutable fields

Leandro Lucarella luca at llucax.com.ar
Tue Nov 2 21:02:49 PDT 2010


Daniel Murphy, el  3 de noviembre a las 13:52 me escribiste:
> "bearophile" <bearophileHUGS at lycos.com> wrote in message 
> news:iaqgvl$1qbp$1 at digitalmars.com...
> > So do you think my code shows a compiler bug?
> 
> I'd like immutable to be implicitly static in some cases eg.
> 
> void foo()
> {
>     immutable int[20] table = [...];
> }

I think immutable should NEVER, EVER be optimized-out from a struct, for
the reasons I gave in the other post.

I really hope this IS a bug, if D would like to stay being a system
programming language. Struct are extremely important to represent memory
layouts, and making that incompatible with immutable seems extremely
silly.

-- 
Leandro Lucarella (AKA luca)                     http://llucax.com.ar/
----------------------------------------------------------------------
GPG Key: 5F5A8D05 (F8CD F9A7 BF00 5431 4145  104C 949E BFB6 5F5A 8D05)
----------------------------------------------------------------------
El techo de mi cuarto lleno de galaxias


More information about the Digitalmars-d mailing list