Brendan Eich wrote:
Allen Wirfs-Brock wrote:
But you should want to do that renaming because the helper is no
longer a method so making it a function that references "this" would
just be a likely source of confusion concerning the intended use of
the function
IOW, OOP-uber-alles does not work and is not necessary in JS. This is
considered a virtue by some, a vice by others. Discuss!
Yes, I agree, +1.
If something is "method-like" I do not see why not to use
this/call/apply. It may as well be "helper pluggable-function" (there
may be a bunch of them an d I can call that bunch a "dynamic mixin"),
there is no law that "helper" can only be a function.
And what's not object-oriented there? They are still objects (as per "X
is object iff X has identity, state and behaviour" except behaviour is
not necessarily declared statically and at one place).
/be
Herby
_______________________________________________
es-discuss mailing list
[email protected]
https://mail.mozilla.org/listinfo/es-discuss