[PROPOSAL] "use" keyword
andrea.giammarchi at gmail.com
Fri Jul 25 14:29:31 PDT 2014
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
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
don't see them ;-)
On Fri, Jul 25, 2014 at 2:13 PM, Michaël Rouges <michael.rouges at gmail.com>
> @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
> es-discuss at mozilla.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the es-discuss