Boost logo

Boost :

From: David Bergman (David.Bergman_at_[hidden])
Date: 2006-07-24 14:08:12


Joaquin wrote (y escribio):

> Please correct if I'm wrong, but I'd say the official
> definition for a MPL lambda expression:
>
> http://boost.org/libs/mpl/doc/refmanual/lambda-expression.html
>
> actually encompasses both metafunction classes and
> placeholder expressions ("proper" lambda expressions, if you
> wish), so "lambda expression" is the common name you're
> after. Am I missing something? (I've got the hunch I am, actually.)

Ok, two interpretations:

1. (Mine) What the MPL documentation calls a "lambda expression" (as of the
refered page) is either "placeholder expression" or meta function classes
*generated* by the application of mpl::lambda, i.e., *just* the meta
function classes generated in that specific way.

2. (Yours) All metafunction classes are "lambda expressions."

I am admittedly biased, but I think my interpretation is the most sound one
;-) The reason for that is that I would hesitate to call an explicitly
defined metafunction class, such as

        struct MyMeta { template<class T> apply { typedef int type; } };

a lambda expression.

I still want to tell my "students" that they should implement a
"metafunctor" rather than a "lambda expression," which I consider to be a
proper sub set of the former :-)

/David


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