Limitations
The original plan was to make use of SpiderMonkey when building MonkeyScript but since we've jumped ahead and are working on a lite version to use while waiting for a C/C++ developer there are some limitations.
- We're limited to JavaScript 1.7, so we don't have some of the nice
JavaScript 1.8 features we'd like to use:
- No expression closures:
function(x) x*x; - No generator expressions:
(i+2 for (i in something))(however we still have iterators and array expressionsi+2 for (i in something)) - Destructuring of arrays in for..in loops is broken. Please DO NOT use the key, value form of
for ( var key, value in array )just stick withfor ( var key in array )orfor each ( var item in array ). - No native reduce or reduceRight. This one isn't a real big limitation, Wrench.js defines reduce and reduceRight for JS 1.7 which doesn't have it.
- No expression closures:
- Less control over the system. Because this is implemented in Java there is no standard way to accept system signals send to the process so unless we do some complex non-standard stuff we won't be able to implement signal catching.
- ...