Boost logo

Boost :

From: timatdvc (timw_at_[hidden])
Date: 2002-02-18 13:30:40


--- In boost_at_y..., Beman Dawes <bdawes_at_a...> wrote:
> Tim,
>
> You might also read Mat Marcus'
> http://groups.yahoo.com/group/boost/message/23654 if you haven't
done so
> already.
>
> The techniques you, Dave, Jeremy, and Mat are exploring are on the
research
> frontier of generic and generative programming. Very few people
understand
> them fully. I know I don't.
>
> For these techniques to migrate into the main stream, there is a
real need
> for descriptive material that is easier to understand. Andrei
Alexandrescu
> did a great job in his book at making policies easy enough to
understand
> that many of us could start using them in everyday programming.
Someone
> needs to do something similar for combining generative programming,
named
> template parameters, and policy-based design into a unified,
> understandable, technique.
>
> --Beman

Thanks for the insight. I have read Mat's post, and if his
experience was anything like mine, I found GenVoca to be rather
cumbersome. It wasn't clear to me how to divide the architectural
layers. That difficulty is partly why I've explored using policy-
based design as a "back-end" to a generator, rather than something
like GenVoca. Policies are just easier to understand.

I definitely agree that these concepts can be quite difficult and I
second the motion that we need some sort of unified description of
these techniques. Up to this point, I've seen a lot of work being
done in the areas of policy-based design and generative programming
being done independently. I see policies as being part of the
solution domain. That is, in a policy based-design, each policy
explicitly represents a part of the solution. They are, by their
nature, good at solving fine-grained problems. Generative
programming, on the other hand, addresses a much larger granularity,
where understanding the solution domain may be too much to ask of a
client.

To continue in the car factory analogy used by C&E, I would equate
policies as being the interchangable parts of the vehicle. This
allows for great flexibility. However, expecting a user to know
about and understand all of the parts may be too much to ask. By
using a generator, the user only needs to make high-level decisions
using the language of the *problem domain*, not the solution domain.
So using policy-based design makes a flexible library easier to
develop, while a generator would make a library easier to use: the
best of both worlds!


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