Kill implicit joining of adjacent strings

Rainer Deyke rainerd at eldwood.com
Thu Nov 11 18:57:37 PST 2010


On 11/11/2010 13:37, Sean Kelly wrote:
> Rainer Deyke Wrote:
>> 
>> As it turns out, the joining of adjacent strings is a critical
>> feature. Consider the following: f("a" "b"); f("a" ~ "b"); These
>> are /not/ equivalent.
> 
> I would hope that the const folding mechanism would combine these at
> compile-time.

Of course it would.  That's not the issue.  The issue is, is a string
that's generated at compile-time guaranteed to be zero-terminated, the
way a string literal is?  Even if the same operation at run-time would
/not/ generate a zero-terminated string?


-- 
Rainer Deyke - rainerd at eldwood.com


More information about the Digitalmars-d mailing list