The fact that we have great web apps shows that things aren't totally broken; that's not really my suggestion. I just think we need to be thinking forwards and planning for future web apps. What we have is not going to do us for the next 5, 10, 20 years :(
I'm not sure why bolting all that stuff on to machine language is conceptually any better (or any less a "hack") than bolting it on to Javascript.
It's all Turing machines/lambda calculus at the bottom, right?
Javascript is slower, sure, but (with recent developments) not that much slower.
The porting issues involved with making something work cross-browser are much less than the porting issues we used to face in making something work on (e.g.) MS-DOS and Mac. With JS the UI needs tweaking. With MS-DOS and (classic) Mac OS you had to do a full rewrite from scratch.
I think theres something to be said in favor of it. Not all programming languages have js execution model. Does js even support true concurrency already? Not last i checked: there goes a whole class of potentially useful applications. We really do want support for these things. It is good for creativity, therefore innovation, because we have more tools to work with.
True in the sense of multiple cores, instead of just asynchronous execution on a single thread. Anyhow, it was just an example... What I'm trying to say is that we want to really explore the capabilities of the web as a platform for computing, as much as possible. Therefore we need as much flexibility, tooling, languages, you name it, as possible. I'm actually suggesting the 'C++' way of creating a platform... i.e. stuff it with as much flexibility as you possibly (reasonably) can and then let natural selection do its work. JavaScript ain't it.
Web workers are atrocious though. They're very strangely hobbled by either requiring a serialize->deserialize round-trip when passing data back and forth, or you can sidestep it by 'transferring' the object across contexts (it then 'disappears' in the original context). The reasons for doing it rather than sharing are obvious (the race conditions would be hard to track down, etc.) - but there's no escape hatch for languages like ClojureScript which has immutable data-structures (and therefore don't care about mutable race conditions) and persistent/structural-sharing datastructures (and therefore would be very costly to serialize/deserialize, or totally broken by the transfer model).
I ran the Quake 3 demo. It was frameskipping all over. Performance was not acceptable for even playing. I think 10-15 fps. No, its not my laptop. My laptop has no problems with real Quake 3. I want to ask you to take a step back and look at it purely from a black box perspective. Forget about JavaScript for a moment. Is it really your opinion this is reasonable performance?
Valid points. I'm open to being convinced JS is a viable target; but the lack of compilers for mainstream lanfguages make me question if it's up to the job. There seem to be many attempts to bring, for example, C# to JS; yet they're all abandoned, incomplete or full of edge cases.
Is targeting JS more trouble than it's worth? Is it a good long-term solution?
See emscripten, mentioned downthread. C/C++, Ruby, perl, Lua, Python are available now.
It shouldn't be too hard to port any language written in C. I don't know what would be involved in getting Mono up and running (so you could get Microsoft languages) but it doesn't seem like it would be impossible.
I didn't think that was your suggestion, but I agree with Turing_Machine re: compiling to JS. It's only a slightly more insane API to the VM than x86 is to the internal instruction set on a CPU, anyway. Weird machines all the way down.
What we have is a very messy, primordial soup. But the more important things are in reducing complexity (while maintaining performance), and in that realm immutable datastructures, fp, etc. are the (current) clear contenders to lead the way. We'll get there, we should just do our best to make sure we don't repeat the mistakes of the past that have become institutionalized on other platforms - or worse, ignore them and make even more dire mistakes (DOM as the lowest-common denominator, etc.)