Decision on container design
Andrei Alexandrescu
SeeWebsiteForEmail at erdani.org
Fri Jan 28 10:31:58 PST 2011
Today after work I plan to start making one pass through std.container.
After having thought of things for a long time, my conclusions are as
follows:
1. Containers will be classes.
2. Most of the methods in existing containers will be final. It's up to
the container to make a method final or not.
3. Containers and their ranges decide whether they give away references
to their objects. Sealing is a great idea but it makes everybody's life
too complicated. I'll defer sealing to future improvements in the
language and/or the reflection subsystem.
4. Containers will assume that objects are cheap to copy so they won't
worry about moving primitives.
Any showstoppers, please share.
Andrei
More information about the Digitalmars-d
mailing list