
On Thu, Aug 25, 2011 at 6:21 PM, Eric Niebler <eric@boostpro.com> wrote:
On 8/24/2011 6:15 PM, Dave Abrahams wrote:
on Wed Aug 24 2011, "Peter Dimov" <pdimov-AT-pdimov.com> wrote:
Dave Abrahams wrote:
I suppose the symmetrical non-lazy version looks like:
f(x) => doesn't call f f(x)(y) => doesn't call f f(x)(y)(z) => doesn't call f f(x)(y)(z)() => calls f
I simply don't see the problem with:
f(x) ==> curry f(x, y) or f(x)(y) ==> curry f(x, y, z) or etc. ==> evaluate
Can you say specifically what you think the problem is? This is how its done in Haskell, for instance (although Haskell doesn't use parens around argument lists).
This allows you to express bind( f, x, y, z ), which was impossible before, but you've now lost the capability to express bind( f, x, y, _1 ), which was.
bind( f, _1, y, z ), which is often needed in practice, is possible under neither, which makes me view this whole exercise as somewhat academic.
I don't see any technical obstacles to:
f(_, y, z)
where _ is a placeholder. You could use positional placeholders for argument reordering.
I'm a big fan of this syntax! +1 for both implicit currying and _ placeholders! -- gpd