Boost logo

Boost :

From: David Abrahams (dave_at_[hidden])
Date: 2002-10-19 08:16:36


"Paul Mensonides" <pmenso57_at_[hidden]> writes:

> As some of you know, I recently added a new preprocessor data type to the
> preprocessor library. I called it a "set" because it is more or less a set
> of parenthesized elements:
>
> (a)(b)(c)
>
> However, Vesa raised the concern that "set" might not be a good name because
> it is not analogous to a "set" in the mathematical sense. The name doesn't
> bother me personally, but I'd like to hear any input from other Boost
> developers/naming experts before I set (no pun intended) the name in stone.
> I like the name "set" because it is short and all of the macros that operate
> on "sets" include the name in their identifiers (e.g.
> BOOST_PP_SET_FOLD_LEFT, etc.). I've also thought of "sequence" (abbreviated
> to "seq") and "series," but I'm open to suggestions. I'm not sure that a
> direct analogy to some runtime (or template-time as the case may be)
> necessarily matters. After all, a preprocessor "tuple" is not really a
> tuple (but its close) and a preprocessor "array" is not like an array at
> all--It's more like a VLA. I main criteria for a name selection is that is
> reasonably short and adequately describes (even if at a base level) what the
> construct is.

What are the performance characteristics?

Does it have an O(1) or O(log N) membership test? If not, I don't like
"SET". Is there any reason to use LIST instead of these beasts? If
not, maybe we should replace LIST. How many different sequence types
do we need? I get the sense that the zoo is getting a little
over-crowded.

-- 
                    David Abrahams
dave_at_[hidden] * http://www.boost-consulting.com
Building C/C++ Extensions for Python: Dec 9-11, Austin, TX
http://www.enthought.com/training/building_extensions.html

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk