|
Boost : |
Subject: Re: [boost] Review Request: Variadic Macro Data library
From: Paul Mensonides (pmenso57_at_[hidden])
Date: 2011-02-20 10:43:52
On Sun, 20 Feb 2011 09:55:14 -0500, Daniel Larimer wrote:
> I think that you have identified a very good use for the variadic
> argument, but I am not sure that it completely conflicts with the ideas
> present in the VMD library. So unless providing utilities to convert
> from VA_ARGS -> SEQ, LIST, Array, etc somehow prevents you from
> expanding the FOR_EACH macro like you described, I would tend to favor
> an incremental approach. Don't hold up useful functionality because
> there is more useful functionality you could add.
>
> Reworking the whole of the PP library with VA support sounds like it
> would significantly delay the adoption of some very useful tools.
I don't have a problem with the particular macros. I do have a concern
about establishing practices which I don't consider to be terribly good
practices.
I'd really like to see a use case that is different from what I'm
envisioning. What I'm envisioning is something like:
#define ALGORITHM_B(...) \
ALGORITHM_A(DATA_TO_SEQ(__VA_ARGS__)) \
/**/
ALGORITHM_B(a, b, c)
I don't find that use case compelling, and that point of view is based on
heavy experience utilizing variadics. When I was initially writing chaos-
pp, I went down this path, but ultimately rejected it. It simply doesn't
scale and results in other intrastructure that doesn't scale.
To attempt to clarify, something like
ALGORITHM_A(DATA_TO_SEQ(a, b, c))
is not really a problem, but the existence of the ALGORITHM_B definition
(as a non-local construct) *is* a problem.
Regards,
Paul Mensonides
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk