From: Shunsuke Sogame (mb2act_at_[hidden])
Date: 2006-12-14 13:35:21
Weapon Liu wrote:
> I think this is the right place to ask this question.
> As cool as boost::fusion is, there's still one question that bothers me,
> that is, if boost::fusion is the hammer, then what's the nail?
> I sure know that it's generic( more so than boost::tuple) and it's
> complete( with a bundle of algorithms and cool utilities), and it seems
> that it "solves" some problem quite well( when I read the documents).
> However, I found it bothering that the documents didn't even mention one
> real-world application( boost libs aside).
> Based on my experience, the most frequent scenarios where
> boost::tuple/fusion is useful are those where one needs a
> generated-on-the-fly struct for holding return values bundle, or where
> one needs to return multiple values transparently( well, nearly so),
> just like those lua does.
The fusion/tuple seems more generic?
Functional languages have curried and uncurried functions.
C++ is considered as a langauge that has "fused and unfused" functions?
void foo(int, int); // unfused
void foo(tuple<int,int>); // fused
Note that functional languages regard unfused one as "tupled"; conFusing :-)
Well, once an unfused function is converted to fused one,
it is unary.
Some kind of job will be easy; e.g. function composing.
-- Shunsuke Sogame
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk