From: Beman Dawes (bdawes_at_[hidden])
Date: 2002-02-18 12:04:30
At 10:45 AM 2/18/2002, timatdvc wrote:
>--- In boost_at_y..., "David Abrahams" <david.abrahams_at_r...> wrote:
>> How does this compare with what Jeremy did in the iterator adaptors
>> with named template parameters?
>After reading your paper, there may not be any difference at all,
>except in minor technical differences and granularity. In your
>approach, you are specifying individual policy classes, which I think
>makes a lot of sense when dealing with low-level components such as
>iterators or smart pointers.
>My focus was more on situations where one would be providing larger-
>scale highly-configurable libraries. I think requiring clients to
>make configuration decisions for such a library by providing low-
>level policies is akin to asking someone who wants a car to pick the
>alternator, starter, belts, spark plugs, etc... Rather, at this
>level, a client should be able to make high-level configuration
>decisions that do not necessarily map to individual policies, but may
>in fact result in many policies being selected. So in that sense, I
>don't think that what I described is at all at odds with your
>approach, but more a kind of insulating layer to hide such lower-
>level configuration details from a client, thereby simplifying the
>use of a complex library.
>Actually, if one took named template parameters using enumerated
>values, this would be a good description of what I used to pass
>configuration information to the generator. The selected (or
>default) options would then result in the actual policies being
>selected. Good paper, by the way! Wish I'd found it sooner. Makes
>me feel a bit like I've reinvented a wheel... ;)
You might also read Mat Marcus'
http://groups.yahoo.com/group/boost/message/23654 if you haven't done so
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,
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk