that's the nonsense I am talking about. In php "use" is defined at function definition time, it's not something you can attach later on.
In JS you can use .call and .apply passing any context to any different function, unless already bound to another context, so you have already way more power than PHP methods or generic callbacks, with or without "use" If you talk about variables as outer scope variables, then I don't udnerstand how you create functions that rely on abstract values around them without knowing what are these values about ... what does it mean sharing variables? There's a lot of mixed and in my opinion unclear content that has not much to do with "use" or PHP and rather what you are trying to achieve concretely which is still a mystery to me. Then, trying to understand what brought you here, I've realized here ( https://github.com/Lcfvs/XEncoder.js/blob/master/XEncoder.js#L49 ) you might want to clear-up a little bit, and a part of this thread, how context and scope work in JavaScript, maybe you have all answers already, you just don't see them ;-) Best Regards On Fri, Jul 25, 2014 at 2:13 PM, Michaël Rouges <[email protected]> wrote: > @Andrea : > > There is no real equivalent in PHP. > > I only used the "use" keyword as example to suggest, in your mind, an > ability to share vars with a foreign function > without to touch the foreign function arguments. ;) > > > > Michaël Rouges - https://github.com/Lcfvs - @Lcfvs > > _______________________________________________ > es-discuss mailing list > [email protected] > https://mail.mozilla.org/listinfo/es-discuss > >
_______________________________________________ es-discuss mailing list [email protected] https://mail.mozilla.org/listinfo/es-discuss

