Lambda evaluation - postfix or prefix?

Neal Gafter neal at gafter.com
Thu Jan 28 14:06:47 PST 2010


On Thu, Jan 28, 2010 at 1:44 PM, Joshua Bloch <jjb at google.com> wrote:
> The proposed syntax is something along the lines of:
>    int result = *foo("bar");

So if I understand, the following invokes the ordinary method foo that
returns a function, and then invokes that function and assigns the
result to the variable

result = *foo("bar")("baz");

While the following invokes a function variable foo, and then invokes
the function that is its result, and assigns that result to the
variable

result = **foo("bar")("baz");

Do I have that right?  If so, this doesn't appear to compose well.

Cheers,
Neal


More information about the lambda-dev mailing list