Topic: Policy-based containers (was: problem with the hash proposal)
Author: dheld@codelogicconsulting.com ("David B. Held")
Date: Fri, 3 Jan 2003 18:48:35 +0000 (UTC) Raw View
"Peter Dimov" <pdimov@mmltd.net> wrote in message
news:7dc3b1ea.0301030621.58f363e5@posting.google.com...
> [...]
> That is what I was responding to. The suggestion was to remove
> implementation freedom and replace it with policies. It is very
> tempting to "resolve" controversial design issues by adding an
> additional policy.
> [...]
True. But then there are places where it's obvious people will write
a few different versions, even if they have 80% or more code in
common. Consider std::vector vs. any number of fixed-size vector
implementations. They share the vast majority of their interface, and
could probably share a lot of code, but don't. It should be obvious
enough that there are places where a resizable vector is better, and
places where a fixed-size vector is better. Would the committee
ever consider a policy-based vector, or would they be more likely
to consider a separate fixed-size vector?
Dave
---
[ comp.std.c++ is moderated. To submit articles, try just posting with ]
[ your news-reader. If that fails, use mailto:std-c++@ncar.ucar.edu ]
[ --- Please see the FAQ before posting. --- ]
[ FAQ: http://www.jamesd.demon.co.uk/csc/faq.html ]