Implicit concatenation of adjacent string literals
Mathias LANG
geod24 at gmail.com
Sun Jun 25 23:37:28 UTC 2023
On Sunday, 25 June 2023 at 21:47:01 UTC, Cecil Ward wrote:
>>
>> `x` only has 2 elements, when it looks like it has 3.
>
> An excellent point. I now fall in with the new status quo. :-)
And it's exactly the reasoning behind the deprecation.
You can find it in the changelog for 2.072, where this
deprecation was introduced:
https://dlang.org/changelog/2.072.0.html#deprecated_implicit_cat
Note that using the concat operator gives you exactly the same
behavior: Concatenation happens at compile time, there is no
runtime cost / GC allocation.
More information about the Digitalmars-d
mailing list