PhobosWatch: manifest => enum

Janice Caron caron800 at googlemail.com
Fri Dec 28 11:48:47 PST 2007


On 12/28/07, Walter Bright <newshound1 at digitalmars.com> wrote:
> and one is drawn
> inevitably to conclude that const(T) is always a different type from T.

I don't think anyone's arguing with that. We're just saying that the
behavior of auto x = could be tweaked to drop the head constancy.

It's the same with passing things to functions.

    void f(int x) { /*...*/ }
    f(DAYS_IN_WEEK);

we want this to compile, right? Even though DAYS_IN_WEEK is likely to
have type invariant(uint). You should always be allowed to create a
mutable copy (though which preserves tail constancy).



More information about the Digitalmars-d mailing list