With the newly implemented bind and the just to implement Object.getPrototypeOf() - as many Javascript engines implement - including IE9+'s - the _this or that can be eliminated - including the more serious issue of having a global reference to evr (which locks the application down to a given variable name, like a reserved word...).
@Gordon, if there are a few bytes left to be 'wasted' on Object.getPrototypeOf(object), that would be cool too.
@Gordon - sorry, again - from your knowledge of the internals of the bind() implementation, what is the memory footprint compared to creating an anonymous function instead? MSDN describes bind() as creating a function with same body on the bound object...
Espruino is a JavaScript interpreter for low-power Microcontrollers. This site is both a support community for Espruino and a place to share what you are working on.
With the newly implemented bind and the just to implement
Object.getPrototypeOf()
- as many Javascript engines implement - including IE9+'s - the_this
orthat
can be eliminated - including the more serious issue of having a global reference to evr (which locks the application down to a given variable name, like a reserved word...).@Gordon, if there are a few bytes left to be 'wasted' on Object.getPrototypeOf(object), that would be cool too.
@Gordon - sorry, again - from your knowledge of the internals of the bind() implementation, what is the memory footprint compared to creating an anonymous function instead? MSDN describes bind() as creating a function with same body on the bound object...