Boost logo

Boost :

Subject: Re: [boost] De Bruijn Bind (alternate bind syntax) Interest?
From: Dave Abrahams (dave_at_[hidden])
Date: 2010-09-03 17:42:36


On Fri, Sep 3, 2010 at 5:22 PM, David Sankel <camior_at_[hidden]> wrote:
> On Fri, Sep 3, 2010 at 4:46 PM, Dave Abrahams <dave_at_[hidden]> wrote:
>
>> On Fri, Sep 3, 2010 at 2:52 PM, Larry Evans <cppljevans_at_[hidden]>
>> wrote:> 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 ;-)
>>
>
> Usability is hurt from whose perspective? The bind author or the bind user?

The bind user

> And how so?

1. It means learning a totally new paradigm for writing ordinary
lambdas that—so far—seems to require the grasp of quite a few concepts
that are not familiar to the average C++ programmer. bind and its
cousins may not be as flexible, but they're designed to be intuitively
graspable (to a C++ programmer), and the paradigm is now going into
the standard so will be lingua franca.

2. Again, please correct me if I'm wrong about this, but it looks like
for "ordinary lambdas" (those that don't need protect), the
corresponding bind expressions are always shorter and simpler.

-- 
Dave Abrahams
BoostPro Computing
http://www.boostpro.com

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