T[new]

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Mon Aug 10 07:11:52 PDT 2009


Walter Bright wrote:
> Kagamin wrote:
>> Of what type will strings be?
> 
> immutable(char)[]
> 
>> Of what type will be the result of concatenation?
> 
> T[new]

Hmmm, I see a problem.

auto s1 = "Hello";
auto s2 = " world";
auto s = s1 ~ s2;

Some might be surprised that the type of s is not the same as that of s1 
and s2.


Andrei



More information about the Digitalmars-d mailing list