From: shunsuke (pstade.mb_at_[hidden])
Date: 2008-04-12 18:26:49
Daniel Walker wrote:
> Egg seems to have a lot of valuable components that may fill a niche
> in the existing paradigm for functional programing in C++, but the
> shape of that niche is changing as more classic boost techniques are
> transmuted into the standard and newer boost libraries come online. So
> there's an unfixed boundary between advancing the cause of functional
> programing and reinventing existing primitives. For example, in C++03
> (and C++0x) there's a need for more flexible/powerful function
> parameters. C++0x variadic functions provides for a variable number of
> type-safe parameters, but what if a user wants to change their order
> or name them? In other words, in either standard, when users need more
> advanced function parameters, how does Egg relate to Boost.Parameter?
For Egg, named parameters facility also should be a FunctionAdaptor.
Actually old Egg had such a FunctionAdaptor.
I removed it in honor of Boost.Parameter.
> Another example: there's a long standing practice of currying
> functions with bind, which will be standardized in C++0x. How does
> Egg's curring "function adaptor" relate to std::bind? (These are just
> some questions that jumped out at me on my first impression. I haven't
> spent a lot of time trying to reason through the documentation.)
Assume std_bind is a FunctionObject type which represents std::bind:
std::bind can be a customization point of egg::lazy.
IMO, bind interface is legacy.
(In fact, to implement std_bind is too difficult,
and bll::bind is enough. So, Egg skips it.)
> FWIW, I did build and run Egg's test suite using gcc 4.3 with both
> -std=c++98 and -std=c++0x. The test suite is large and seems to have
> good coverage. It ran with only one apparently minor glitch, which is
> testimony to the quality of Egg's implementation. Egg is certainly an
> accomplishment. Shunsuke, later this weekend I'll try to send you the
> test suite output and a few other comments off-list.
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk