The demise of T[new]
Jason House
jason.james.house at gmail.com
Sun Oct 18 19:43:47 PDT 2009
Andrei Alexandrescu Wrote:
> grauzone wrote:
> > Walter Bright wrote:
> >> We both feel that this would simplify D, make it more flexible, and
> >> remove some awkward corner cases like the inability to say a.length++.
> >
> > How would this remove this corner case?
>
> Can't increment length if it's read-only.
>
> Andrei
removing syntactic sugar doesn't really remove corner cases. T[new] is being replaced with an array builder. What usage semantics are given up with an array builder? How will implicit conversions be handled? (alias this, etc...). How will the Phobos array buiilder support user specified lengths (for efficiency)?
More information about the Digitalmars-d
mailing list