On Feb 28, 2015, at 9:07 AM, Brendan Eich wrote:
> 
> No, again, I'm objecting to Allen's just-so story that `function` in an arrow 
> refers to the arrow, and agreeing with Mark that the pellucid meaning (if 
> there is one) would be the TCP one: the enclosing function around the arrow 
> (if there is a function).
> 
> We need to get to the bottom of this to make progress, in any case. I don't 
> think we should jump to `=>.self` for arrows and `function.self` for 
> functions, although that is an obvious "patch" to resolve the conflict. 
> Patching to split forms and "do both" is often the wrong thing.

If you want both a TCP-able from and a local (most closely enclosing callable 
thing) form then the later should also presumably also be applicable at the top 
level of functions.

The 'in'  meta property prefix in combination with the 'function'  prefix could 
do that job:

let foo=function () {
     function.count;  //the number of actual arguments pass to current 
invocation of foo
     in.count;             //same value as function.count
     () => {
          function.count; //the number of actual arguments pass to invocation 
of foo captured by this arrow
          in.count;            //the numer of actual arguments passed to this 
invocation of this arrow
      }
};

Allen

_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss

Reply via email to