const

Scott S. McCoy tag at cpan.org
Fri Mar 28 19:07:49 PDT 2008


The type inference provided by typeof(a) I think should be unnecessary.
In fact, it's on the fringe of incoherency and it's meaning is a lot
less than obvious.

I have to ask, what's the difference between a const view into an
immutable value, and a const view into an invariant value?  Nothing
right...so since you can't modify data from a const view of the data,
and an invariant is a thing that can't be modified, shouldn't you be
able to seamlessly promote an invariant to const, with no side effects?

Cheers,
    Scott S. McCoy

On Fri, 2008-03-28 at 18:31 -0700, Walter Bright wrote:

> 
> typeof(a) foo(const(T) a) { ... }
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.puremagic.com/pipermail/digitalmars-d/attachments/20080328/48a9cd30/attachment.html>


More information about the Digitalmars-d mailing list