|
Boost : |
From: David Abrahams (dave_at_[hidden])
Date: 2003-09-13 10:52:15
"Brock Peabody" <brock.peabody_at_[hidden]> writes:
>> -----Original Message-----
>> From: boost-bounces_at_[hidden] [mailto:boost-bounces_at_[hidden]]
>> On Behalf Of Joaquín Mª López Muñoz
>> Sent: Friday, September 12, 2003 4:55 AM
>> To: Boost mailing list
>> Subject: Re: [boost] Optimization of MPL expression?
>>
>>
>>
>> Brock Peabody ha escrito:
>>
>
> [...]
>
>> I wanted to hide MPL from the user. Picture yourself a potential
>> average user reading the tutorial and, when it comes to the
>> specification of indices, being referred to the MPL documentation!
>> She'd probably be scared away. MPL is terrific, but IMHO is not a
>> library every programmer would want to be exposed to. Besides, the
>> MPL sequence used must be a forward sequence, not every sequence is
>> valid. A lot of technical mess for such a simple application.
>
> On the surface this seems like a good argument, but I really don't
> think we want every boost library that needs typelists to roll their
> own just so the users don't have to see the MPL. If you want to
> hide the MPL and keep the user from having to choose a container you
> could use a using declaration to bring mpl::vector in to
> indexed_sets.
Sometimes vector is the wrong name. When building a domain-specific
language you may need to build a wrapper. See boost/python/bases.hpp
and boost/python/detail/type_list.hpp.
-- Dave Abrahams Boost Consulting www.boost-consulting.com
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk