DIP 1025--Dynamic Arrays Only Shrink, Never Grow--Community Review Round 1
Guillaume Piolat
first.last at gmail.com
Tue Nov 12 13:10:06 UTC 2019
On Monday, 11 November 2019 at 10:27:26 UTC, Mike Parker wrote:
> This is the feedback thread for the first round of Community
> Review for DIP 1025, "Dynamic Arrays Only Shrink, Never Grow":
>
> https://github.com/dlang/DIPs/blob/1b525ec4c914c06bc286c1a6dc93bf1533ee56e4/DIPs/DIP1025.md
>
I don't know.
C++ has std::vector and std::string_view, but our slices do these
two things. It makes things easier sometimes but in the end you
have to track ownership in your head, especially if you use @nogc
and -betterC.
Does "dynamic arrays ARE slices" really hurt us?
This change would break a great number of libraries, as said in
the thread. Personally I have zero interest in more memory safety.
On the other hand, maybe we can go "leap of faith" on this.
It would also help if there was a good std::vector replacement in
the stdlib, with explicit .capacity.
More information about the Digitalmars-d
mailing list