DIP 1025--Dynamic Arrays Only Shrink, Never Grow--Community Review Round 1
no at spam.net
Mon Nov 11 11:32:11 UTC 2019
On Monday, 11 November 2019 at 11:17:26 UTC, Jonathan M Davis
> Honestly, this seems like a prime case for how trying to make D
> work better with code that doesn't want to use the GC is making
> D worse for code that does want to use the GC. I really,
> really, really hope that this change does not make it into the
> language. From where I sit, it would make the language hands
> down worse. In fact, as far as usability goes, it would make
> 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.
> IMHO, where D's dynamic arrays and strings sit right now as far
> as memory allocation goes is the sweet spot. They're efficient
> at both growing and shrinking. If I wanted a language that was
> catering to the non-GC case over the GC case, I'd use C++.
> Improvements to D that make it work better with @nogc code
> without compromising code that uses the GC seems like a good
> idea to me, but this very much compromises the language for
> code that uses the GC. _Please_ don't do this.
I'll move on from D if this change is incorporated. It's a
terrible idea that would break code that shouldn't be broken. It
would also be a sign that D is effectively giving up on GC in an
attempt to compete with Rust, and as such is no longer suited for
general purpose programming.
More information about the Digitalmars-d