convert static arrays to dynamic arrays and return, have wrong data.
via Digitalmars-d
digitalmars-d at puremagic.com
Wed Nov 12 07:58:17 PST 2014
On Sunday, 9 November 2014 at 10:04:16 UTC, bearophile wrote:
> Yeah, what do you suggest to change in the language to avoid
> this problem?
1. Deprecate dynamic arrays.
2. Implement dynamic arrays as a library type with it's own
fat-slice implementation which supports reallocation (slices with
indirection and stored begin/end indices).
3. Provide conversion to regular shrinkable slices for operations
on the array with a warning similar to those provided by
iterators in C++.
More information about the Digitalmars-d
mailing list