Boost logo

Boost :

From: David Bergman (David.Bergman_at_[hidden])
Date: 2006-07-24 15:11:59

Joaquin wrote:


> I've reread the referred page, and all I can take it to
> define is: a lambda expression is a metafunction class or a
> placeholder expression. Whether this is what the authors actually
> *meant* is debatable, of course.

What I think it literally means is that a lambda expression is either a
metafunction class or a placeholder expression, much like a woman is either
nice or mean. This does NOT imply that all nice people are women ;-) So, I
think even the literal reading of the refered sentence(s) leaves room for
non-lambda-expressive metafunction classes...

> Personally, I favor your interpretation of what lambda
> expressions and metafunction classes should be defined to be,
> I was only sticking to the reference.
> <pedantic digression>
> Just to play devil's advocate, what gives a lambda expression
> its essence, at least in mathematical lambda calculus, is not
> the presence of place holders, but the ability to apply to
> actual arguments,

No, that is not true, actually, since that essence of applicability is best
captured by the notion of "function." A lambda expression is a special type
of function (or, rather, lambda expressions are isomorphic to a set of

This is analogous to the MPL discussion we have, where I find that
"metafunctors" captures that notion better than the (more specific) "lambda

> and this ability can be coded with
> mechanisms other than placeholders. For instance, in
> combinatorial calculus
> (,
> all lambda expressions can be given equivalent formulations
> using only the combinators S and K, thus effectively avoiding
> the use of placeholders altogether.

Yes, but they all share the common element of abstracting a parameter into a
(concrete) expression, even though the parameters are not symbolically
present in the (super) combinatorial systems.

> It could be an
> interesting investigation project to determine whether
> combinatorial methods can be modelled into the
> metaprogramming framework of C++ just the way lambda
> expressions have been.

Yes, it could. In some sense, the mechanics of function adapters in C++
mirrors that parameter-less and beautiful world to some extent.

> </pedantic digression>


Boost list run by bdawes at, gregod at, cpdaniel at, john at