any news on const/invariant?
Sean Kelly
sean at f4.ca
Thu Nov 29 08:47:06 PST 2007
Regan Heath wrote:
>
> I think I'd rather loose:
> (*) const as a storage-class
>
> and make the separation between const and invariant more pronounced.
>
> There would be no need for the caveat above, however:
>
> const x = 5;
>
> would become illegal and this breaks existing valid 1.0 code.
This is one reason I think "const" should be used for "data that will
never change" in D 2.0. It's what it is in D 1.0. The concept is
simply being extended.
Sean
More information about the Digitalmars-d
mailing list