News for hackers. Stuff that matters.
Re:Mug: A New JavaScript compiler for the JVM by CoffeeDregs on Monday January 10, 2011 @01:12PM (#2089203)
Right, right, but then how useful would Mug be if the dynamic stuff in JS can't be used?
Re:Mug: A New JavaScript compiler for the JVM by JonnieCache on Monday January 10, 2011 @01:34PM (#2089273)
Munging strings and then eval()ing them is the worst way to write dynamic code. Hopefully its not common in most js libraries.

Missing eval() is a feature.

Re:Mug: A New JavaScript compiler for the JVM by latortuga on Monday January 10, 2011 @04:34PM (#2089829)
As a follow up in case anyone is curious about the why behind this assertion, consider a line of code like this

    eval("myObject."+functionName+"()")
Not only does it make it difficult to track down the calls to this method, it is now impossible to minify this chunk of code, something that is very commonly done in javascript. This is why javascript includes things like apply() and accessing members of an object in multiple ways (obj.attribute == obj['attribute'], for user-defined values of attribute).
Re:Mug: A New JavaScript compiler for the JVM by phuff on Monday January 10, 2011 @02:37PM (#2089461)
The "dynamic stuff" appears to all be included. Just not eval(), which is probably a bad thing for most JS code anyway...