O
optimistx
If a function is defined deep in the object chain
long.chain.of.identifiers.fun = function () {//...}
one can define a variable f
var f =long.chain.of.identifiers.fun ;
and thus have less typing, when calling fun:
f();
instead of
long.chain.of.identifiers.fun();
I thought that these should always behave in the same way,
give the same results, and follow the same execution path
inside ...fun.
Is it so? Or is there a caveat here e.g. connected to the
reference vs value thingy?
I ask this instead of continuing to debug the situation
with FORK.Event -library of Peter Michaux, where
the success of calling of listeners seems to depend on
this.
If needed, I might set up an example later.
long.chain.of.identifiers.fun = function () {//...}
one can define a variable f
var f =long.chain.of.identifiers.fun ;
and thus have less typing, when calling fun:
f();
instead of
long.chain.of.identifiers.fun();
I thought that these should always behave in the same way,
give the same results, and follow the same execution path
inside ...fun.
Is it so? Or is there a caveat here e.g. connected to the
reference vs value thingy?
I ask this instead of continuing to debug the situation
with FORK.Event -library of Peter Michaux, where
the success of calling of listeners seems to depend on
this.
If needed, I might set up an example later.