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

Dukc ajieskola at gmail.com
Tue Nov 12 12:30:42 UTC 2019

If we are to do this, we need to limit the breakage somehow. A 
few ideas, that could perhaps be used in some combination:

-Instead of disallowing appending on arrays, change the garbage 
collector so that it'll never append in place. Of course, this 
has the potential to be a performance killer so alone it won't be 

-Only disable GC appending in @safe or @live

-Come up with a way to mark some code or module to diallow GC 
appending, but do not disable it everywhere. Something that won't 
require yet another attribute in every function declaration.

-`scope` slices can be appended on.

Rust is already infamous for being hard to get into because of 
the borrow checker. So we definitely should not implement 
everything it does the same way. This DIP in it's current form 
would cause so much damage that if we fall behind because we 
won't do it, so be it.

More information about the Digitalmars-d mailing list