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