News for hackers. Stuff that matters.
Re: Why are we limited to JS in browsers - would a bytecode ... by lincolnq on Thursday November 11, 2010 @09:41AM (#1893928)
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.

Re: Why are we limited to JS in browsers - would a bytecode ... by skybrian on Thursday November 11, 2010 @10:45AM (#1894116)
JavaScript 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.

Re: Why are we limited to JS in browsers - would a bytecode ... by lincolnq on Thursday November 11, 2010 @11:06AM (#1894180)
Yes, 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.
Re: Why are we limited to JS in browsers - would a bytecode ... by chrisaycock on Thursday November 11, 2010 @10:48AM (#1894130)
We can add Skulpt (Python) to that list too.