C is Brittle D is Plastic
Walter Bright
newshound2 at digitalmars.com
Tue Apr 7 05:27:51 UTC 2026
On 4/3/2026 4:32 PM, Richard (Rikki) Andrew Cattermole wrote:
> Prefix string interning, can't optimize the text segment so only one copy of a
> given sequence of bytes is present.
>
> As in: AB, ABC, ABCD
> Only needs ABCD in text segment.
>
> Whereas: AB\0, ABC\0, ABCD\0
> Can't be optimized down to just ABCD\0.
>
> Idk how much that matters, but that was the argument.
You are correct, but in practice I cannot see it being an issue, as it is not
worse in any way than existing C string literals.
More information about the Digitalmars-d
mailing list