
At Mon, 28 Mar 2011 18:45:26 -0500, Andrew Sutton wrote:
The argument comes from a usability perspective. If I want to use a data structure, I expect it to work a certain way---to have a specific interface with guaranteed behaviors. Generative data structures like the adjacency list don't fit that model. All of the generated implementations may be AdjacencyLists, but they're all refinements in one way or another. One side effect of this is conditional document dependent on the choice of selector arguments.
Basically, it's a metaprogram masquerading as a data structure, which I perceive as not great. I'm sure there are plenty of people who will disagree.
I was never very fond of generative programming (despite the iterator library), so not I.
Another feature that has been on BGL's want list is the implementation of algorithm objects.
For example?
Just a class that wraps the algorithm. There are several in the BGL. The technique offers a little more flexibility when the number of parameters is large.
Sure; it's easier to carry state across function calls. -- Dave Abrahams BoostPro Computing http://www.boostpro.com