4 ms·
Then why don't you treat your JavaScript as object code, and compile a language you like better to it? It does not lack types (it just lacks static type checki
by lincolnq 16y ago
Then why don't you treat your JavaScript as object code, and compile a language you like better to it?
It does not lack types (it just lacks static type checking); it is not significantly slower (JavaScript JIT is very advanced, and you're not compute-bound in JavaScript). And "it does not execute the same way on all platforms" is true for pretty much all languages on all platforms, so I don't know what you're getting at.
If you'd like a better language I can suggest CoffeeScript and ghcjs.
- skybrian 16y agoJavaScript lacks 64-bit integers and binary data, just for starters. You can emulate these things (GWT does) but not efficiently. Byte code isn't necessarily the solution though. It might be a good idea to add these types directly to JavaScript, so they're usable both directly and as an object language.
- lincolnq 16y agoYes, it's true that it's utterly ridiculous that JS doesn't have integers. That's a definite lack of foresight on the part of the ECMAScript authors.
- chrisaycock 16y agoWe can add Skulpt (Python) to that list too.