Boost logo

Boost :

From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2002-04-17 23:54:18

> > For the sake of argument,
> > why would you need any other type of list then a completely random
> access one
> > that is really huge?
> <snip>
> > What is the possible benefit of anything else? If you think this is
> better,
> > design the library around something like this.
> One very simple example of why you'd want to work with a different type
> sequence (and this doesn't even speak to differences in structure) is
> that you might want to operate on the sequence of types held by a
> boost::tuple. One ought to be able to re-use the metaprogramming library
> for that purpose.
> -Dave

Dave, I really don't want you and Aleksey to take my commentary personally. I
think the MPL is a really interesting and cool library. We just have some
difference of opinion about the necessity of abstraction of a sequence
implementation to an algorithm.

As far as boost::tuple is concerned, it would be trivial to map that type into
some other sequence type to process it with the library and then back again.
That kind of thing keeps differences localized rather than spread out all over
the library (or multiple libraries). I really think it should be about how to
make *my type* work with the library rather than the library work around *any
type that is designed a certain way* (i.e. provides the iterators, etc.), after
all, *my type* is significantly smaller than the entire library of algorithms.

For a terrible ascii-art structure of what I'm talking about...

_______________ _______________
| | | |
| library A | | library B |
| (MPL) | | (other) |
|_____________| |_____________|
       ^ ^
_______|_______ _______|_______
| | | |
| map to A | | map to B |
|_____________| |_____________|
       ^ ^
         | |
         | some structure |

( please don't criticize my artwork, I know it's terrible :) )

This is a much better long term solution. It is naive to think that the MPL is
the defacto implementation of meta-programming facilities.

Paul Mensonides

Boost list run by bdawes at, gregod at, cpdaniel at, john at