const

Scott S. McCoy tag at cpan.org
Sun Mar 30 15:31:07 PDT 2008


On Sat, 2008-03-29 at 00:05 -0700, Walter Bright wrote:

> Janice Caron wrote:
> > I suggested that a declaration like
> > 
> >     const int x = 5;
> > 
> > should be interpretted by the compiler as if the statement had been
> > 
> >     invariant int x = 5;
> > 
> 
> Yeah, but I can see the bug report now: "dammit, I typed it as const, 
> why is it coming out as invariant?"


The last thing I want is for the compiler in a statically typed language
to just decide to change my type for me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080330/8fe80e04/attachment.html>


More information about the Digitalmars-d mailing list