Michel Fortin wrote:
On 2009-02-21 15:11:15 -0500, Andrei Alexandrescu <[email protected]> said:

The conundrum is that a type system can't say that T[N] has some semantics for N <= Nmax and some other semantics for N > Nmax. So we need to pick one, and probably picking the value semantics is the right thing to do.

I think it is the right decision too.

This way "static array" becomes the container type and "dynamic array" is the corresonding range type. Perhaps some concept renaming is in order for D2:

    static array  => array
    dynamic array => array range (or slice)


Yah, and that would give a good model to follow for user-defined containers.

Andrei

Reply via email to