primitive vector types

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Feb 21 12:09:11 PST 2009


Christopher Wright wrote:
> Andrei Alexandrescu wrote:
>> Jarrett Billingsley wrote:
>>> Please make them value types.  I, for one, am tired of dealing with 
>>> their crap.
>>
>> Ok, you just tipped the balance :o). I'm also realizing something. The 
>> scenario I'm most afraid of is something like:
>>
>> char[10000] humongous = "This is a humongous message. I will type here 
>> exactly 10000 characters. ... ";
> 
> This is less of an issue with the type of string literals being 
> invariant(T)[] rather than invariant(T)[length]. Even less so if the 
> default type for array literals were dynamic rather than static arrays.

Exactly so. So with this other fix in the language there's even more 
push toward value semantics for T[N].

Andrei



More information about the Digitalmars-d mailing list