The problem with const proposals

Walter Bright newshound1 at digitalmars.com
Fri Dec 7 16:10:57 PST 2007


Jason House wrote:
> I'd love to see "const X" == "const(X)" as an axiom ;)

I've tried to avoid having a specific syntax as an axiom, because 
ideally the syntax should be derivable from the axioms.

> I
> believe that in the current design, there's no way for the compiler
> to guarantee that a cast to invariant is valid because there's never
> a guarantee that a non-invariant bit of data will be written to by
> something else.

There have been some papers written about this. Unfortunately, the 
various designs for it just aren't workable.




More information about the Digitalmars-d mailing list