DIP 1025--Dynamic Arrays Only Shrink, Never Grow--Community Review Round 1

Jonathan M Davis newsgroup.d at jmdavisprog.com
Mon Nov 11 21:54:23 UTC 2019


On Monday, November 11, 2019 2:34:39 PM MST Walter Bright via Digitalmars-d 
wrote:
> On 11/11/2019 3:26 AM, Nicholas Wilson wrote:
> > The breaking changes are massive and not well argued for.
> > The suggested workaround of
> >
> > 1) a = a ~ b;
> >
> > in place of
> >
> > 2) a ~= b;
> >
> > is functional identical, thus any issues present in 2 are also present
> > in 1.
> The point is making it obvious that the GC is being used, i.e. it is
> intentional behavior.

Both ~ and ~= use the GC, and it should be obvious that they do, since they
can't work if they don't. Using ~ isn't any clearer than ~=, and ~ has worse
performance when a dynamic array is able to grow in-place.

- Jonathan M Davis





More information about the Digitalmars-d mailing list