C's Biggest Mistake on Hacker News
Ecstatic Coder
ecstatic.coder at gmail.com
Wed Jul 25 22:46:49 UTC 2018
On Wednesday, 25 July 2018 at 21:16:40 UTC, Walter Bright wrote:
> On 7/24/2018 4:53 AM, Ecstatic Coder wrote:
>> str = str1 + " " + str2;
>
> But you have to be careful how it is written:
>
> str = "hello" + "world";
> str = "hello" + "world" + str1;
>
> don't work, etc.
Yeah. That's exactly there where D shines, and C++ s*cks...
C++ string constants are stupid pointers, no size etc. Indeed one
big C++ silly thing that Walter fixed perfectly. He is the only
language designed who found and applied the perfect solution for
strings, arrays and slices. Big respect to him...
More information about the Digitalmars-d
mailing list