The demise of T[new]

grauzone none at example.net
Sun Oct 18 14:52:46 PDT 2009


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?

> What do you think?

Whether T[new] is bultin (mostly implemented in the runtime), or a 
library type (implemented in Phobos) doesn't make much a difference; 
it's pretty much the same, isn't it? I don't understand what the exact 
reasons for this decision.

If anything, the array type should be available without additional 
Phobos imports (i.e. it should be declared in object.d). Ease of access 
and ease of use is the key thing here.



More information about the Digitalmars-d mailing list