On Thursday, October 15, 2015 11:48 PM, Random D user wrote: > Should array have clear() as well? > Basically wrap array.length = 0; array.assumeSafeAppend(); > At least it would then be symmetric (and more intuitive) with > built-in containers.
No. "clear" is too harmless a name for it to involve an unsafe operation like assumeSafeAppend. With containers there is always one container that owns the data. There is no such notion with dynamic arrays.