(Web) Development Sucks, and It's Not Getting Any Better
blog.dantup.com
blog.dantup.com
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.
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.
Things are arguably getting a lot better.
I think web workers will use multiple cores, if you have them, but don't quote me on that.
https://github.com/kripken/emscripten/wiki
And yep, I was right. Web workers do make use of multiple cores, and there's at least one parallel programming library that takes advantage of it:
Really a shame.
For running any application that spends 99% of its time waiting for the user to press a key (which is most of them)? Sure. No problem at all.
Is targeting JS more trouble than it's worth? Is it a good long-term solution?
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.
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.)
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.
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!!!