[PROPOSAL] "use" keyword

Andrea Giammarchi andrea.giammarchi at gmail.com
Fri Jul 25 14:43:41 PDT 2014


.call, .apply works with every non-writable method you want ... Rick
answered, I've fixed your broken example (parens missing, checks on the
method instead of the object itself, etc ...) and finally Tab wrote what's
the closest thing you can think of between two closures, once you export
outside those two functions.

I'd done here, good luck with your task.

Best Regards


On Fri, Jul 25, 2014 at 2:41 PM, Michaël Rouges <michael.rouges at gmail.com>
wrote:

> @ Andrea :
>
> .call, .apply and .bind change the this in the function, then it can't
> catch the goal and it doesn't work with non-writable methods again.
>
> It's why my detailled example (
> http://esdiscuss.org/topic/proposal-use-keyword#content-4) is written
> with object methods (to etablish all constraints).
>
> And don't worry... dont make a fixation on the PHP use, read the last
> Rick's post. ;)
>
>
>
> Michaël Rouges - https://github.com/Lcfvs - @Lcfvs
>
> _______________________________________________
> es-discuss mailing list
> es-discuss at mozilla.org
> https://mail.mozilla.org/listinfo/es-discuss
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.mozilla.org/pipermail/es-discuss/attachments/20140725/83768faa/attachment.html>


More information about the es-discuss mailing list