T[new] misgivings

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Tue Oct 20 06:09:46 PDT 2009


Steven Schveighoffer wrote:
> On Fri, 16 Oct 2009 05:49:12 -0400, Walter Bright 
> <newshound1 at digitalmars.com> 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.
> 
> Andrei says you think arrays are like slices with some extra 
> functionality, but slices are *not* a reference type, they are hybrids.  
> Do you think T[new] arrays should be fully reference types? (I do)

I might have misrepresented his position. We both think T[new] is a 
reference type, and it was implemented that way in the now defunct feature.


Andrei



More information about the Digitalmars-d mailing list