As much as your coding practice is laudable,... it is challenging the memory constraint, since it is not compiling to byte or token code and interpret it but it does it all from source. Simple minification helps to get rid of the comments and the long variable names that have function / block scope. Other than that it cannot handle more compression (short names) without more meta information. Globals - variables and functions have to be the same if you minify multiple files individually. Building protytpes(/classes) and as short as possible functions(methods) and - if data and process separated - have data-objects with short as possible property names helps with space. Comment is never and issue. What helps as well is putting the code into a modules and used these minified.
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.
As much as your coding practice is laudable,... it is challenging the memory constraint, since it is not compiling to byte or token code and interpret it but it does it all from source. Simple minification helps to get rid of the comments and the long variable names that have function / block scope. Other than that it cannot handle more compression (short names) without more meta information. Globals - variables and functions have to be the same if you minify multiple files individually. Building protytpes(/classes) and as short as possible functions(methods) and - if data and process separated - have data-objects with short as possible property names helps with space. Comment is never and issue. What helps as well is putting the code into a modules and used these minified.