T[new] misgivings
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Oct 16 07:03:35 PDT 2009
Walter Bright wrote:
> Don wrote:
>> There are two sensible options:
>
> I see the question as, is T[new] a value type or a reference type? I see
> it as a reference type, and so assignment should act like a reference
> assignment, not a value assignment.
I understand that, but to me that's an example of the good intentions
that pave the way to hell. All of a sudden we have the best syntax there
is either being surreptitiously inefficient, or not work at all.
Why not see arrays as what they really are? They are a struct with a
pointer inside it. The struct has opAssign. Period. Why "see" the arrays
in a way that's ungainful?
Andrei
More information about the Digitalmars-d
mailing list