Boost logo

Boost :

From: Alexander Nasonov (alnsn_at_[hidden])
Date: 2007-10-01 10:21:38


Joel de Guzman <joel <at> boost-consulting.com> writes:

> Yep. Both has its uses.
I agree.

> I believe Alexander's code accepts only polymorphic functions.

That's right. It's like boost::function except that it can have
more than one overload:

typedef mpl::list<int (int), double(double)> sigs;

multi_function<sigs> f = _1 + 1;

f(0);
f(0.0);

> So, you can also use 'overloads' to gather the monomorphic functions
> and feed that to Alexander's.

Yes. It would add another level of indirection, though.

> Cool stuff Alexander! I'd like to use dynamic_any in the
> lisp/scheme interpreter I'll be writing as an example for
> spirit2.

Are you planning to use only function_call operation or all
operations? If the latter, I'm not familiar with values in
scheme/lisp to say whether dynamic_any fits or not.

--
Alexander

Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk