DIP 1025--Dynamic Arrays Only Shrink, Never Grow--Community Review Round 1
Ola Fosheim Grøstad
ola.fosheim.grostad at gmail.com
Mon Nov 11 12:21:37 UTC 2019
On Monday, 11 November 2019 at 11:17:26 UTC, Jonathan M Davis
wrote:
> D's strings _worse_ than C++'s strings. Sure, we'd still be
> able to get substrings more efficiently than C++ can, but not
> being able to append to a string makes it a pretty terrible
> string. At least C++'s strings can do that efficiently.
C++17 differentiate between the owner of the string:
https://en.cppreference.com/w/cpp/string/basic_string
And the "borrowed" slice of a string:
https://en.cppreference.com/w/cpp/string/basic_string_view
In C++20 this is extended to contiguous buffers with std::span.
More information about the Digitalmars-d
mailing list