Possible change to array runtime?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Fri Mar 14 09:38:23 PDT 2014


On 3/14/14, 8:58 AM, Don wrote:
> Actually it would help a great deal. In most cases, we do set the length
> to 0. That example code is unusual.
>
> FYI: In D1, this was the most important idiom in the language.
> In the first D conference in 2007, a feature T[new] was described,
> specifically to support this idiom in a safe manner. Implementation was
> begun in the compiler. Unfortunately, it didn't happen in the end. I'm
> not sure if it would actually have worked or not.

Some perspective would be interesting.

1. Do you think eliminating stomping was a strategic mistake? (Clearly 
it had tactical issues with regard to portability.)

2. If you could do it over again, would you go with T[new]? Something else?


Andrei




More information about the Digitalmars-d mailing list