One reason you probably shouldn’t bet your whole career on JavaScript by@okaleniuk

One reason you probably shouldn’t bet your whole career on JavaScript

Read on Terminal Reader
react to story with heart
react to story with light
react to story with boat
react to story with money
Oleksandr Kaleniuk HackerNoon profile picture

Oleksandr Kaleniuk

I fell in love with JavaScript long before it was cool. I’m not sure about the exact date and time, but definitely before StackOverflow and probably after GMail announced its beta. Back in the day, it was used mostly to clutter innocent web sites with bells and whistles nobody wanted. Like these January waltzing snowflakes reminding you that Christmas is over and so is bourbon and you have no friends.

A roommate of mine had friends, and he introduced me to the guy who was deep in this emerging front-end thing. And this guy told me the two biggest secrets of JavaScript: it’s not Java, and it’s not script. Well, everybody knows this now, but at that time knowing that you have a full-power multi-paradigm language in basically every browser in the world was like urban legend coming to life. It was like learning that your favorite toothpaste is actually made of cocaine, you just don’t rub it into your dents hard enough.

I got hooked. And I wrote pretty bizarre things in JavaScript. Like a multivariate function optimizer, that could infer variable names from a string expression, and then find their values in a local optimum. All in less than 100 lines of code. Not because I really had to, though, but because I could. The language combining dynamic typing with functional capabilities, JavaScript was arguably the most versatile, the most “easy to do weird things”, language between the mainstream ones.

Now of course everything is made of cocaine. Every mainstream language is multi-paradigm now, every one has functional programming; and dynamic typed ones have type annotations, and static typed ones has variable types instead. And this brings us to the unpleasant conclusion. JavaScript is just not that exciting as a language anymore.

Good ideas are not a privilege now, but a commodity. They transfer freely from one standardization committee to another making all the mainstream languages more and more alike. If I start jogging tomorrow and change my drinking preferences to carrot juice, I could live up to that time when all the mainstream programming languages will become the same.

JavaScript was holding its dominance in front-end for too long. Basically, all its glory comes not from the ingenious design, but from the simple thing that it became de-facto standard on the wave of rising bandwidth and processor power. Now, as everybody gets more focused on performance and power economy, the whole thing is being redesigned.

Come to think about, the way the things work now is rather stupid. I mean, in order to have depressive snowflakes on your screen, you have to get a JavaScript source from a server, then run a lexical analysis on it, syntax analysis and semantic analysis, then a bunch of machine dependent optimizations; and only then the essential part — machine level optimizations and machine code compilation. Why do we want to do all of it on an every client, if not for every request, when we can do most of the work once and on a server side?

And here comes the solution. WebAssembly addresses this exact problem. It’s a binary executable format for browsers. It promises to make everything better, faster, more robust, more reliable, more maintainable. And it also makes JavaScript irrelevant.

Now every language that can compile to WebAssembly, which is basically every compilable language ever, will work for front-end development. Java, Python, C#, C++, even Fortran if you’d like. So JavaScript would not be the only option soon enough. The very first time in its existence it would face competition in its own domain.

Not that the competition will necessary kill JavaScript. Technically, Objective-C was not killed by Swift. It is still quite popular, just not like in the good old days. And Delphi wasn’t exactly slaughtered by C#. And Lisp machines didn’t entirely lose to Unix all at once. And, you might not believe me, but there is still some active development going in Fortran as well.

You should only realize, that every career choice is a gamble. Nothing is for sure. And nothing is for life. Well, unless you’re going to live a really short one. JavaScript is on top of its game right now. It looks big and shiny and promising. But technologies change. Everything does.

WebAssembly will definitely be a huge game changer for the JavaScript world. And I’m not even sure, there will be a JavaScript world some 5 on 10 years from now.

Hacker Noon is how hackers start their afternoons. We’re a part of the @AMIfamily. We are now accepting submissions and happy to discuss advertising &sponsorship opportunities.

To learn more, read our about page, like/message us on Facebook, or simply, tweet/DM @HackerNoon.

If you enjoyed this story, we recommend reading our latest tech stories and trending tech stories. Until next time, don’t take the realities of the world for granted!

react to story with heart
react to story with light
react to story with boat
react to story with money
. . . comments & more!