Is implicit string literal concatenation a good thing?

Jarrett Billingsley jarrett.billingsley at gmail.com
Sun Feb 22 10:15:52 PST 2009


On Sun, Feb 22, 2009 at 12:51 PM, Bill Baxter <wbaxter at gmail.com> wrote:
>
> I use this feature pretty frequently to break up long strings.
> I think I didn't use ~ for that because it makes me think an
> allocation might happen when it doesn't need to.
>
> But after seeing the discussion here I'd be happy to switch to using
> "a"~"b" as long as it's guaranteed by the language that such strings
> will be concatenated at compile time.   (I think the is the case now,
> right?)

Of course, it does it as a matter of constant folding, just like 3 + 4.



More information about the Digitalmars-d mailing list