|
Boost : |
From: Douglas Paul Gregor (gregod_at_[hidden])
Date: 2003-10-08 15:13:44
On Wed, 8 Oct 2003, David Abrahams wrote:
> My next comment:
>
> lambda(X)[ let[ Y == X %plus% 3,
> F == minus[2]
> ].in[
> F[Y]
> ]
> ]
>
> a. Is there a *reason* that square brackets have to be used for
> postfix function args in lambdas?
Because the "," operator wouldn't work if you use parentheses, and you'd
be stuck with lots of overloads of operator() instead of one operator[].
> b. It seems like
>
> lambda(X)[ let[ Y == X %plus% 3,
> F == minus[2]
> ],
> F[Y]
> ]
>
> would be a little sweeter, syntactically speaking.
I disagree with this. The "let" introduces new variable bindings within
the scope after the ".in". I think if FC++ is to remain "true" to existing
functional languages, it should keep the ".in".
Doug
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk