On Mar 28, 2012, at 2:19 PM, Erik Arvidsson wrote:
> With your proposal I have to do let f = obj.foo;
> obj::f which is even longer than the original.
That's not a fair argument. There's no need for the let-binding; you can write
obj::obj.foo
or
::obj.foo
Now, you might feel that it's more intuitive for the latter form to be
expressed with an infix operator. I'm sympathetic to that. But my operator is
more expressive, because it can also express .call, which Alex's ! operator
can't:
o1::o2.foo(x, y, z) ~= o2.foo.call(o1, x, y, z)
I would love to have built-in syntax for doing all three ABC methods
(.apply/.bind/.call), so that's what I find appealing about the :: syntax. It's
nice conservation of special forms that :: in conjunction with ... can
accommodate all three. But perhaps we should explore two separate new forms.
> Another important, but orthogonal part of his proposal was to have
> obj!meth === obj!meth
I'm not sure I have an opinion about this part yet. Can you explain the
rationale?
Dave
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss