Why JavaScript Is Doomed
simpleprogrammer.com
simpleprogrammer.com
The parts that are actually substance consist mostly of broad unsupported claims and very general unrelated facts about JavaScript. It's as if Leo Laporte wrote it.
Sigh... Besides that this article is a jumbled mess to read, the TL;DR of it would essentially boil down to: "I don't like JavaScript because I don't like the way it looks. It's doomed!"
You are not your technology - This one bites new engineers all the time, they mix up the fact that they are really facile in <tech> with they are smart capable developers. So they mistakenly react to attacks on <tech> as personal attacks. After you've learned your fourth or fifth programming language they begin to blur together.
Languages are not islands - which is to say that nobody writes 'pure' language <x>. They call libraries and those libraries provide abstractions for getting things done. So when the libraries are good for what you are trying to get done, the language is great. This is why perl is great for some things, and why C++ is great, and yes even Java can be pretty useful too. If you're trying to do thing <x> and there is a lot of support for doing <x> like things in the libraries that come with the language, then you can be forgiven for imputing that value to the language rather than the environment around it.
It's not doomed though, and it can't really be a bubble since we're not talking about money here. If some new language is developed that runs in browsers it will be wounded, perhaps mortally, but until then that spot is pretty comfy.
Also, it's a bit contradictory to argue that you could replace JS with any programming language and simultaneously argue that JS is garbage. In fact, if you simply swapped in Ruby, your argument would be largely the same; you'd still be stuck with the DOM and CSS.
JS isn't a perfect language. The latest disappointment for me is the lack of any well-defined module or namespace system; it forces people into ad-hoc solutions when Python, Ruby, or other dynamic languages have pretty good systems.
But there's nothing egregiously bad about the language, at least IMHO. What the author really seems to hate is web development, including CSS and the DOM, and probably the fact that they hardly have any choice. (Not coincidentally, I suspect this is why many people have problems with JS. I am sympathetic.) I suppose something nuanced like that makes for a less linkbait-y headline, however.
For the sake of legacy code browser vendors would still have to support javascript natively for the indeterminate future as well. No one's going in and changing the umpteen million lines of extant javascript to Dart no matter how many browsers can run it or how semantically nice it is.
It is exactly the ubiquity of JavaScript which makes it nearly impossible to "take away" and which makes it useful!
Dart probably won't succeed even though it is arguably a cleaner and prettier language simply because JavaScript is good enough and it is everywhere.
Yes, I do, for the simple reason that JavaScript is the only language that runs in every browser, full stop.
It doesn't matter how ugly it is. It has the privileged position of being the only language that runs in the browser, so if you want to do any kind of client-side scripting, it's JavaScript or nothing.
This makes the emergence of frameworks to smooth over the language's pain points inevitable. If jQuery had never been invented, Prototype or Mootools or one of the zillion other frameworks would have taken over the world. But JavaScript's monopoly over scripting the browser is what drove all those frameworks' popularity, not the other way around.
"JavaScript has some things that are fundamentally wrong with it that no amount of covering up or pretending will fix."
As long as JavaScript is the only way to script the browser, whether JS is fundamentally flawed or not is sort of an academic question. It remains the only way to get from point A to point B regardless of its flaws.
"Even though the world seems bright and cheery for JavaScript developers today, it also seemed equally bright and cheery for Blackberry devs not too long ago. And look how that turned out."
Blackberry devs are getting pummeled because there was somewhere else for Blackberry users to go. Where else are JavaScript users supposed to go to script the browser? There is no alternative.
"Take JavaScript away and replace it with another programming language and you don’t really miss anything."
Except that in practice, you can't do that. Browser vendors can do that, but none of them appear to have any interest in doing so. (The article mentions Dart, but Dart compiles to JavaScript.) And that's not even considering what would happen if all the browser vendors backed different languages... oy.
Way back in the earliest days of browser scripting, it was thought that languages would be 'pluggable' -- that there'd be, say, a Python plugin for your browser, and devs would be able to script the browser in Python through it. (Which is why up until HTML5 SCRIPT elements were required to include a TYPE attribute; it was assumed that "application/javascript" would be just one type among many.) But that never happened.
"You can only build so much on top of something else, before you have to wipe the slate clean and start over."
There's no practical way to wipe the JS slate clean. JS is out there, right now, baked into a gazillion different browsers and devices. Even if you come up with a better alternative, how do you get it into enough of those browsers and devices to create the critical mass required for developers to start writing for it?
The only practical answer is that you get them into new browsers and devices, and then wait for all the old ones to die or be replaced. Which means that if something really does rise up and try to replace JS, you will have pleeeenty of lead time to get ready for the change. Like, decades of it.
Amen. I am getting kind of tired of this litany of breast-beating over how "ugly and awful" JS is and how it is "doomed".
I find that the things that make JS "ugly" to a novice (functional scoping, module patters, etc.), are the same things that make it powerful and elegant in the hands of an expert.
I don't use Lua, I have/see/envision no interest for Haskell other than as a toy, the latest Java 0-day exploit is only 15 days away[1], PHP still looks like a mess to me and I abhor C++ (and Rails too, but it's another matter). Yet I wouldn't ever call one of these languages "doomed" because I know that my personal vision isn't the vision of our industry and that even for something as strange as brainfuck, there'll be an engineer who will find uses for it[2].
What I find even more about this article is that we are a community where so many of "us" are already suffering from depression, Impostor Syndrome[3] and many other "bad emotions" and someone is still out there preaching negativity, telling us how people who "put all [their] eggs in javascript" aren't "smart".
What's the point? Didn't we learn from our own DongleGate and similar events that this attitude was in no way the winning attitude that our more talented peers exhibited to elevate themselves? If you don't want to be the next PG, Zuckerberg or any 10X engineer, go ahead! But don't try to drag anyone with you down a hole of your own making.
Taken at face value, this is just link bait.
Ooh, a video!
I personally am developing applications with minimal JavaScript a la Pinboard.