How do you remove/insert elements in a dynamic array without allocating?
thedeemon
dlang at thedeemon.com
Wed Nov 7 01:19:06 PST 2012
On Wednesday, 7 November 2012 at 06:44:11 UTC, Jonathan M Davis
wrote:
> On Wednesday, November 07, 2012 04:45:04 Malte Skarupke wrote:
>> I don't anticipate that I will ever run into a situation where
>> I want to append to a range without caring about whether it
>> allocates and copies or not. If I want to append to a range, I
>> will write the extra line to create a copy manually.
>> Because of that I don't need the syntactic ambiguity of
>> treating
>> a range the same as an array.
>
> In general, you can't append to ranges.
I assume Malte really meant slices, not ranges.
More information about the Digitalmars-d
mailing list