|
Boost : |
Subject: Re: [boost] [GSoC] [Boost.Hana] Formal review request
From: Larry Evans (cppljevans_at_[hidden])
Date: 2014-07-30 13:29:16
On 07/29/2014 04:54 PM, Louis Dionne wrote:> Larry Evans <cppljevans
<at> suddenlink.net> writes:
>
>>
>> [...]
>>
>> I looked at:
>>
>> http://ldionne.github.io/hana/index.html
>>
>> but saw no mention of the `let-expressions` that was mentioned here:
>>
>> http://article.gmane.org/gmane.comp.lib.boost.devel/245231
>>
>> Did I miss where they are documented or was there some problem
>> in implementing them and, consequently, they were left out?
>
> That was for the MPL11. With Hana, we use generic C++14 lambdas instead,
> so we don't need that emulation anymore.
>
> Regards,
> Louis
>
So, let me check to see if I understand how generic c++14 lambdas
would be used to emulate let-expressions.
The let-expressions I'm talking about are described here:
http://docs.racket-lang.org/reference/let.html
Generic c++14 lambda expression are described here:
https://isocpp.org/wiki/faq/cpp14-language#generic-lambdas
The correspondence between the two, IIUC, is the let-expresion:
( let
( [id1 val-expr1]
[id2 val-expr2]
[id3 val-expr3]
...
)
body-expr
)
would be, using generic-lambdas:
[]
( auto id1
, auto id2
, auto id3
)
{ return body-expr
}
( val-expr1
, val-expr2
, val-expr3
...
)
Is that about right?
TIA.
-regards,
Larry
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk