As someone on a team working very hard on cutting-edge techniques to improve web development, I disagree entirely. While I complain more than anyone I know about the underlying infrastructure, it's a salvageable situation.
In fact, because of the lack of standardization on a single toolset or approach (e.g. Cocoa, WPF, etc.), we're in a position to improve well beyond the current SoTA. Some examples:
React.js from IG/FB: One of the first opportunities in the browser to treat rendering as a stateless canvas, freeing us from the complexity of time-management.
ClojureScript[1] - and more importantly, the immutable data structures from ClojureScript, let us simplify our UI programs conceptually. And combining it with React (Om), we can make UI's both fast and simple
All of these, and the wide-open nature of the web as it exists today, means we're in a position to experiment with radically new ideas and find a much more efficient way of representing our goals. It's a really exciting time to be working on this stuff.
Nevertheless, I upvoted because I do believe we're in a plato's-cave situation with current practices in web-development. There's very little overlap between the desktop and web world, so many of the lessons haven't carried over - how to manage complexity, the important of tooling, etc. But we're making our way, bit by bit (or more recently, leap upon leap)
[1] I'm admittedly biased as I've put considerable amounts of effort into the project, and it's not without its warts. GC pressure can sometimes be very tough, and the tooling needs a lot of work.
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.)
> Tools That Convert to JavaScript are a HACK [..] they’re usually full of edge cases, varying browser support, inconsistent performance and other strangeness.
The second part is true of any platform that has multiple independent implementations, it isn't because compiling to JS is a hack (which it is; but that's irrelevant here). If everyone used the same browser with the same rendering engine and the same JS engine, we wouldn't have browser support issues, inconsistent performance, etc.
It's not just compiled-to-JS languages that have browser incompatibilites etc., it's also HTML and CSS, and non-compiled JS. The issue is the fundamental tradeoff of the web being a spec that anyone can implement, which keeps the web open. But it also means multiple implementations with different performance characteristics and so forth.
The web was never designed to be an ultra-consistent platform that is super-easy to develop for, which is what the article pines for. If you do want such a thing, the closest is probably Flash - good developer tools, single implementation. It was good for some things, but being a single implementation was one reason why it is losing popularity.
With all that said, the web is actually gaining powerful low-level capabilities these days. So you could build something more consistent on top of those. Specifically, you could render UIs using pure WebGL and avoid much of the overhead of the DOM and JS. And compile-to-JS languages can give you more predictable performance than JS itself, because they can emit simpler code (e.g., no garbage collection necessary). There is a big opportunity to create a tool using those two which would give a much better developer experience than the web currently has.
I've been doing this for 15 years and it sucks more and more. Now we have complex as hell client-side frameworks like Angular. A framework on top of my framework, great! More and more screen sizes/devices/browsers, but not a freaking way of handling any of this information because, for some stupid reason, the User-Agent header is useless. CSS media queries are useless. JavaScript window.size is useless.
The problem is: HTML is not made for applications, it's made for documents, linked documents. The day someone put a form in HTML hell broke loose and even after 20 years, the web is seriously broken and things are just getting worst. For example, date input fields; supported by Chrome and Safari, but not by Firefox. You want to localize it? IT SUCKS! I thought Java's Calendar was crap, but JavaScript's Date is pure mayhem... And I could go on and on about why HTML/CSS/JS is all a bunch of crap which, instead of evolving, are making things harder.
And now they want to add Future/Promise to JavaScript... HAHAHAHA!!!
In fact, because of the lack of standardization on a single toolset or approach (e.g. Cocoa, WPF, etc.), we're in a position to improve well beyond the current SoTA. Some examples:
React.js from IG/FB: One of the first opportunities in the browser to treat rendering as a stateless canvas, freeing us from the complexity of time-management.
ClojureScript[1] - and more importantly, the immutable data structures from ClojureScript, let us simplify our UI programs conceptually. And combining it with React (Om), we can make UI's both fast and simple
Datascript & friends: Bringing entire in-memory databases client-side.
All of these, and the wide-open nature of the web as it exists today, means we're in a position to experiment with radically new ideas and find a much more efficient way of representing our goals. It's a really exciting time to be working on this stuff.
Nevertheless, I upvoted because I do believe we're in a plato's-cave situation with current practices in web-development. There's very little overlap between the desktop and web world, so many of the lessons haven't carried over - how to manage complexity, the important of tooling, etc. But we're making our way, bit by bit (or more recently, leap upon leap)
[1] I'm admittedly biased as I've put considerable amounts of effort into the project, and it's not without its warts. GC pressure can sometimes be very tough, and the tooling needs a lot of work.