I agree with you in concept, but the Web is actually not strictly tied to javascript. In the short term (say, next decade), JS is probably not going anywhere, but in the longer term I hope someone creates a more well-thought-out replacement. (And for the record, I kind of like javascript, just a few things I would change with it.)
Well that was basically the point I was trying to make. The web is going to have to evolve to a post-Javascript future at some point. I believe this will happen no matter how hard the JavaScript-only diehards fight against it. I'm certainly not saying the web is doomed, only that it would be if the JavaScript-only crowd really got their wish (which in the long run they won't, they can't).
If JavaScript never goes away and no other options are built into the web browser, the web will become irrelevant within 10-15 years.
No language lasts forever (especially not one that evolves as slowly as Javascript does), and tying the web to JavaScript and JavaScript only very obviously dooms the web. Not this year or three years from now, but eventually.
That nobody other than Google is making long-view plans for the future in this regard is somewhat insane.
And I'm not saying this because I think it's the best ever, or because I don't learn from history and how things change.
It's the nature of the web. We're still dragging things from HTTP/0.9 and and from HTML 1.0 along.
But also, JS is a capable script engine with millions of USD put into engineering VMs into it, and the networks effects are inescapable. I don't see WASM replacing it either. They'll be used in tandem.
If you want to know what the future of Javascript looks like, look at the present of Java.
It's a monster language with maximum bureaucracy, but it's not going anywhere, since most large companies already have legacy systems built with Java.
But I also am not a fan of this direction just like you. My personal thought is, JS will never lose its dominance just like Java, and it will grow and grow until it becomes a monster like the Java ecosystem, and it will become shittier and shittier.
But that is only until something disruptive comes along that will decimate the influence of the desktop web browsing experience as we know it.
It isn't replacing JavaScript. At the very least you still need JS to access the DOM. And, for backwards compatibility, I don't see JS going away during our lifetimes. And I don't see another language being added to browsers in place of JS (not including webassembly, which is not a replacement for JS).
The likelihood of Javascript becoming non-dominant in the next 20 years is pretty low, I think. Rather than replacing it wholesale, you'll simply see it turn into something better over time.
IMO, the issue isn't if you like Javascript or not. It is is Javascript a reasonable language for compilers to target.
I think the core proposal is that Javascript stays the defacto language of the web, but you build a standardized IL that all browsers target. Of course Javascript would be one of the core languages that would guide the design of the IL, because you don't want this new IL and Javascript to incompatible.
The nice thing though is after you do that, other people can write new languages that target that IL, and they're not second-class citizens. It allows there to be real language innovation on the IL, just as there is language innovation on x86.
The problem today is that JS is not a great language to target, and it relegates anything that targets it to second-class status (why are you using XYZ, why not just use Javascript?).
I think its a great idea. IMO, this would be a far more important development than HTML5 for the life of the web.
I've said it before here and I'll say it again: the JS ecosystem is moving in the wrong direction.
Sometimes I feel that with Javascript, we developers have taken something that wasn't ours, and we're in the process of destroying the best thing there ever was about it.
One of its best qualities used to be that you could have absolutely no idea what you're doing, read a few bad tutorials somewhere on the web, mash your head onto the keyboard and end up with something horrifying that was nevertheless close to what you wanted to achieve. It was beautiful, egalitarian. Like the web is supposed to be.
I've spent quite a bit of time on Stackoverflow, coaching people who you would not call developers (nor would they themselves) on how to do that one tiny thing they wanted to add to the site for their bakery, yoga studio or blog. And almost got it working themselves. I know of no other language that can tell a similar success story, with that high an impact.
Just insert that <script> for that jQuery plugin here and modify that initializer over there with a vague understand of how it needs to be adapted to your situation. Voilà!
But we couldn't let that stand, could we? Because what works for Alice and Bob doesn't work for somebody writing that 200.000 line image editor or CRM in JS, and let's face it, that's what the web is about.
So here we are, the single <script> tag having been replaced with compilers, transpilers, five mutually incompatible build systems, three different module systems in God knows how many implementations, frameworks changing their API every ten minutes and five thousand lines of NPM module code to be installed for even the simplest of tasks.
We did it, gals and guys! The web is safely back in the hands of full-time professionals (with Hindu cow-like frustration tolerance). Where it belongs.
I wonder if there'll ever be an alternative to Javascript. I'm not talking about those things that eventually get translated to Javascript, I'm talking about a native platform well thought-through and based on a typed language that isn't a mess. Yeah, I know: it's not Javascript that's broken, it's the DOM. I'd argue that both should be replaced by something else, otherwise the future will be 90% native mobile apps, which isn't a bad prospect if you can afford to develop and iterate for two different leading platforms.
I don't think everyone is necessarily happy with JavaScript, but it is the de-facto standard, and there is no realistic alternative.
Sure, we could add a new language, but with various competing implementations we will probably get at least the same amount of interoperability problems as we have had with JavaScript.
And because of backwards compatibility browsers will still have to support JavaScript indefinitely in addition to the new language.
I would be very unhappy with a suggestion to replace javascript. I like that I can mix functional, object-oriented, and procedural type code where each seems to be the best fit.
If something else comes along, gains a lot of traction, and develops its own ecosystem then javascript could conceivably eventually just fade into the background. But that's going to take time.
I agree that javascript will be replaced in time, but that article in no way asserts that javascript is declining in favor of WebAssembly. WebAssembly shows promise, but it nowhere even near ready to begin mass adoption.
I have no issue with javascript fading away over time, that's just not what's happening right now.
If it means the end of JavaScript, I'm all in. Let's get back to having real application languages for applications, and markup languages for text.
I hope that we'll come around to the idea that this two-decades long fascination with abusing the hell out of web technology was a fever dream, and go on to build something better on more substantial foundations.
We really need a quantum leap in language technology. Currently the Internet technologies have grown organically and because of this, most of what we use to program has been repurposed.
HTML was meant to describe text, now it describes regions of the screen to be repainted as well as the "content" to be repainted.
CSS was meant to add simple effects like bold, italic and simple newspaper-like positioning (float this image left). It's been repurposed to describe visual rendering and even animations.
JavaScript was meant to add some scriptability to the DOM, and now it's morphed into a full-fledged programming language.
So the state of the web is a depressing mishmash of old, repurposed technologies.
It would be nice if there were a programming language that "knew" about the web. It would realize that the programming effort would be shared between two computers, client and server, and would have appropriate security and other conveniences baked in. For example, you should only have to describe your business logic once (as opposed to once on the server and once on the client). Also, this programming language should no longer be tied to the anachronistic concept of rendering a "document" with "styles".
But alas, it's very hard to simply go into an academic tower and design a language and release it into the wild and expect it to catch on. These things tend to grow organically and incrementally. So whatever next step there is has to embrace where we currently are. This is why you see not merely new client-side languages, but new languages that compile to JavaScript. If they didn't compile to JavaScript, how could they ever be used?
I see your point, my own biases are present in some of those remarks. I do see javascript as a very powerful and easily learned language that would support an open web future well, but I also recognize that the likelihood that it would be javascript forever is small. One small point, though. Just by opening this debate and the two of us discussing this, we are contributing towards a future where we decide what gets adopted into browsers. Debate is something that is seriously lacking in closed source communities as the developers remarks too often fall on deaf ears. The people who decide what technologies to support in the open web are members of sites like these and are required to believe in open discourse.
reply