Boost logo

Boost :

Subject: Re: [boost] De Bruijn Bind (alternate bind syntax) Interest?
From: Larry Evans (cppljevans_at_[hidden])
Date: 2010-09-03 18:12:20


On 09/03/10 15:46, Dave Abrahams wrote:
> On Fri, Sep 3, 2010 at 2:52 PM, Larry Evans
<cppljevans_at_[hidden]> wrote:
>>> And why would a C++ programmer care about making the implementation of
>>> beta-reduction easier?
>>>
>> I thought that's essentially what mpl::apply<F,A> does.
>> Let's see, from:
>>
>> http://en.wikipedia.org/wiki/%CE%91_conversion#.CE.B1-conversion
>
> I've already read it; I know what it is.

Yes, I figured that; however, that made me wonder why you asked the
question. The only way I could answer the question, I thought, was to
provide the reference. Besides, even though you are familiar with it,
others reading the thread might not be, which is another reason why
the reference was provided. Sorry, I didn't mean to imply that you
didn't know about it.

I guess the reason is that the question was asked from the
perspective of the user, not the implementer, of the library. That
perspective is also suggested by your followup statement:

> this would make it easier for bind
> library writers at the expense of usability

>
>> Since, as I mentioned, I had trouble understanding how apply
>> worked, and the code seems pretty complicated, at least to me,
>> I was hoping DeBruijn's method would offer simplifications.
>
> From the examples I've seen so far, this would make it easier for bind
> library writers at the expense of usability. On th other hand, once
> lambdas start to use protect() I'm usually giving up on them ;-)
>

OK, but at the time I was having trouble, I didn't know of an
alternative. I'll try to remember the particulars of the problem I
had to illustrate the point. That also might give Mr. Sankel another
use case.

-respectfully
Larry


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