|
Boost : |
Subject: Re: [boost] Need for BOOST_PP_VARIADIC_POP_FRONT
From: Gennadiy Rozental (rogeeff_at_[hidden])
Date: 2011-11-13 23:49:47
Edward Diener <eldiener <at> tropicsoft.com> writes:
> > That's good. Why not wrap it all into a simple macro that does it all?
>
> Because I would only be duplicating endless functionality which the
> other Boost PP data types already have.
We duplicating functionality for 4 different data types already.
> > That's the core issue: variadic data provides better interface.
> > And do not see why we should discourage use of it. I believe it
> > should be supported completely
> > with all the necessary interfaces. Internally we should be free
> > to convert back and forth between variadic data and PP data
> > structures, but it's implementation detail.
>
> I agree that it provides an easier to use interface for the end user.
> But I strongly disagree that it is a better interface than the other
> Boost PP data types.
I feel like we are playing with the words. If you have an option to provide
interface like this:
FOO((a)(b)(c))
or this:
FOO( a, b, c )
which one would you prefer, find easier, more convenient, better?
I expect variadic based interfaces to become quite popular in near future and
eventually prevail over any other kinds of macro based interfaces (in cases
where one truly want variable number of macro arguments).
Boost PP library should treat it like a first class citizen as well. Internally
we might want to convert variadic data in a different collection type to perform
some advanced data massaging, but not always
Regards,
Gennadiy
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk