November 21, 2014
On 11/21/14, 1:59 PM, "Marc Schütz" <schuetzm@gmx.net>" wrote:
> On Friday, 21 November 2014 at 15:00:31 UTC, ketmar via
> Digitalmars-d-learn wrote:
>> On Thu, 20 Nov 2014 14:23:23 -0300
>> Ary Borenszweig via Digitalmars-d-learn
>> <digitalmars-d-learn@puremagic.com> wrote:
>>
>>> This way you avoid silly typing mistakes while at the same time you
>>> allow splitting a string across several lines without having to
>>> concatenate them at runtime.
>> i bet that current D frontend is able to concatenate string literals in
>> compile time.
>
> AFAIK yes. There was a change to guarantee that string literals
> concatenated by ~ are joined at compile time. The goal was to deprecated
> concatenation by juxtaposition, which hasn't happened yet, though.

What's concatenation by juxtaposition?
November 21, 2014
On Friday, 21 November 2014 at 17:43:27 UTC, Ary Borenszweig wrote:
> What's concatenation by juxtaposition?

When "foo" "bar" turns into "foobar". The two string literals are right next to each other, no operator or anything else in between, so they are combined.
November 21, 2014
On 11/21/14, 2:46 PM, Adam D. Ruppe wrote:
> On Friday, 21 November 2014 at 17:43:27 UTC, Ary Borenszweig wrote:
>> What's concatenation by juxtaposition?
>
> When "foo" "bar" turns into "foobar". The two string literals are right
> next to each other, no operator or anything else in between, so they are
> combined.

Ah, I see. Yes, I guess that's a bug-prone thing to have. And since there's already `~` to concatenate strings (even at compile time) removing that feature would be good.
1 2
Next ›   Last »