If T[new] is the container for T[], then what is the container for T[U]?

Andrei Alexandrescu SeeWebsiteForEmail at erdani.org
Sat Apr 25 06:07:52 PDT 2009


It looks we can't make it with only T[]. We need a genuine container 
type, and T[new] was suggested. It would probably have value semantics.

T[U] seems to have the same problem. If T[U] is the range, then how do 
you call the container?

If we follow through with a no-garbage-collected option for the core 
types, then we also need to distinguish between a slice and its 
container. The fact that we (almost) got away with T[] being at the same 
time the container and the slice was that the garbage collector would 
collect all unused slices.


Andrei



More information about the Digitalmars-d mailing list