Invariant doesn't apply to declared symbols

Janice Caron caron800 at googlemail.com
Fri Nov 30 00:00:04 PST 2007


On Nov 30, 2007 7:04 AM, Jason House <jason.james.house at gmail.com> wrote:
> This is the one thing that really bugs me about const...

We've kind of been through all of this before. I haven't completely
grokked how things are changes since the last upheaval, but for what
it's worth...


>   invariant(S) s;
>   s = ...; //legal

I thought Walter said we'd got rid of tail-const, and now there's just
const? I thought that const(T) now meant that T is fully const?

But you're right. The docs say otherwise. What's the deal?


> It seems that "const(char) *p;" and "const(char*) p;" have identical
> meanings even though the syntax is different.

That was one of things we all complained about. I really thought
Walter was getting rid of that one, and that, from now on, const(T)
would mean "T is fully const". Apparently not.

Walter, could you clarify? Is this being sorted out?



More information about the Digitalmars-d mailing list