Array append proposal

Steven Schveighoffer schveiguy at yahoo.com
Fri Oct 10 10:15:39 PDT 2008


"Denis Koroskin" <2korden at gmail.com> wrote in message 
news:op.uitjgjkdo7cclz at proton.creatstudio.intranet...
> On Fri, 10 Oct 2008 21:04:54 +0400, Steven Schveighoffer 
> <schveiguy at yahoo.com> wrote:
>
>> you can't successfully append to a slice that is at the end
>> of a memory block.  But you can't do that today, either.
>>
>
> And this is something that needs to be fixed.

Allocating in-place to the end of an array is an optimization.  It's not 
guaranteed to happen, and you can't write code that depends on it.

However, having a slice overwrite other parts of an array because it appends 
in place (the current D behavior) is a serious design flaw.  That is what 
I'm trying to fix.

-Steve 





More information about the Digitalmars-d mailing list