DEV Community

Rachel Snijders
Rachel Snijders

Posted on

Why is everything Javascript?

I am not sure if this is the right place and time to ask this question, but there is something I really don't understand. You might have guessed what.

Nowadays, there are seemingly more programming languages, frameworks and ways of solving software related problems than values in a 64 bit integer. Additionally, I really don't like working with or reading (about) Javascript. It feels messy, there are a million ways to do anything, yet everything 'feels' wrong.

So why does it seem like everyone is obsessed with the language? Every community, video platform, in-person meetup always has like a 65% focus on Javascript and 35% anything else.

Am I missing some universal truth that will make me love the language? Most other tools I find really interesting and I want to learn more about them, like Go, Rust, various data storage systems, etc.

But out of all things, Javascript seems to rule the world.

Top comments (36)

lexlohr profile image
Alex Lohr

ECMAscript (also known as JS) is the standard scripting language running inside web browsers. Attempts to change that (VBscript, Java applets, Flash/ActionScript, GWT, Dart) have all failed.

Furthermore, JS succeeded beyond the browser, making its jump to the server (node, deno, bun, llrt) and embedded systems (espruino).

There's no hidden truth that will magically make you love JS. Like any other language, you'll have to get used to it to get comfortable using it. Starting with ES6 which was released 2015, it got a lot better over the years and is still improving. The same applies to the tools around the language.

If every solution feels wrong for, maybe what you need is a mentor to guide you. Or maybe you're just not meant to be a JS Developer and should rely on web assembly to run languages like rust in the browser.

miketalbot profile image
Mike Talbot ⭐ • Edited

For me, I use JavaScript because it's the closest thing to Write Once, Run Anywhere with no compilation step.

  • JIT compilation, no build scripts to make things work if you go vanilla.
  • A homogenous language between the front end and back end reduces context switching and improves my performance.
  • In recent years it's become a pretty nice language to express yourself in, especially for async code, and its dynamic nature is part of its power, not its pitfall - but it needs embracing, not hiding from.
  • Massive community support, huge numbers of open-source packages
  • It's fast enough for every app I've built and you can easily integrate other things if you need to

I say this as someone who comes from a C, C++, and Java background with a decade-long sojourn into C#

ingosteinke profile image
Ingo Steinke

JavaScript used to be very messy and quirky before esllint, JSDoc, ECMAScript, and TypeScript. But it is still far from clean and type-safe. But it used to be the only programming language supported by every web browser, and with Rhino, node, and Webpack, people started using JavaScript for backend and dev-ops, so that they did not have to learn additional languages like Python, Perl, or bash:

bwca profile image
Volodymyr Yepishev

'cos you can build anything with it 🫣

Image description

tandrieu profile image
Thibaut Andrieu

In the early 2ks, there were essentially C/C++ and Java. And VB, but we don't talk about VB. These languages were hard to use, and had the unfortunate tendency to crash your whole machine at the slightest mistake. So you needed a lot of courage and pugnacity to write a single working program. This era gave birth to great, high-quality softwares like... Windows Millennium or... Internet Explorer 6.

Then, Web comes into play with its javascript.

Suddenly, every dumb-a** teenager with a keyboard were able to integrate fireworks, animated banner or that kitten that follow your mouse in their web page. javascript, contrary to other langage, was very permissive, and let you create funny annoying stuff very easily, as long as you don't watch the error console. It spread all around the web like a cancer. Years latter, those teenager becames Engineer, then Directors. And they bring with them what they have learned, forcing everyone to use this technology for things it wasn't created for.

Their madness pushed them to create javascript for desktop with electron, or even worst, Node.js, to port javascript where it should never have been: on the backend...

That, Rachel, is the story of the worst creation of mankind...

peerreynders profile image

Am I missing some universal truth that will make me love the language?

The universal truth is that there is no need to love JavaScript (or TypeScript).

You will never master JavaScript if you cannot learn to respect its idiosyncrasies.

To get into the right frame of mind perhaps watch this:

“Dear Developer, the Web Isn't About You”

… and paraphrasing …

“Dear Developer, JavaScript Isn't About You”—but what you can accomplish with it (in a relatively short amount of time).

The way to get on with JavaScript is to know and respect its faults, recognize its strengths and above all, to not try to make it into something it isn't by shoehorning it into a frame of some programming language you happen to be familiar with or one you would rather be working with—JavaScript is what it is.

Once you get to that level of competency, JavaScript is a non-issue and you can move on to enjoying building whatever you need to build (and whatever value that provides). JavaScript, just like programming, is a means to an end—not an end in itself.

That said, experience in other (Scheme or Lisp flavoured) programming languages will benefit JavaScript competence.

More recently, “why” it's happening:

“… because of the hydration problem … for these declarative Frameworks to work on both sides efficiently, you need to have JavaScript on both sides; I'm not saying your whole back end has to be JavaScript …”

Evolving Isomorphic Data-Fetching - YouTube

New constraints have been leading to a complete rethinking of how we handle isomorphic data-fetching in JavaScript frameworks. Truthfully I don't have the fu...


“… if you're not using JavaScript on the server, you're doing it wrong … but if you care about end-user experience, you can make more significant improvements by running JavaScript on the server [compared to any other server language «you» prefer] …”

Evolving Isomorphic Data-Fetching - YouTube

New constraints have been leading to a complete rethinking of how we handle isomorphic data-fetching in JavaScript frameworks. Truthfully I don't have the fu...

adam_cyclones profile image
Adam Crockett 🌀

My take, just keep doing what your doing your job security is far greater in rust or go or any lower level.

The idea of a scripting language as a backend is appealing I suppose for ecosystem and speed and you know what they say, go where the money is.

Personally I’m learning C# and python lately

alvaromontoro profile image
Alvaro Montoro

There seems to be many developers that think if you are not doing JavaScript, you are not really developing. Based on that (mis)conception, it is natural to use JavaScript to simplify (more like "JavaScriptify") what other languages like HTML, CSS, or a server side language can (and should) do.

Don't take me wrong, JavaScript is essential nowadays. It is convenient being able to do many things in a single language, but many times it's at the cost of performance and complexity –even when the solution claims to remove complexity, what it ultimately does is adding a new layer of abstraction... which leads to more complexity.

If you enjoy Go, do Go. If you enjoy Rust, do Rust. And remember: you don't need to love a language or marry it (although specializing in a language will give your career a nice boost), just to work with it.

mrlinxed profile image
Mr. Linxed

A lot of the things are done with the web browser nowadays. And Javascript happens to be what runs in browsers.

If you're already hiring javascript developers you might as well make your backend in JS as well.

Aside from that, if something is popular enough, it'll fuel itself. It's hip. It's easily talked about. It creates lots of views and interaction. Other languages are viewed as dusty.

That being said, you do what you want to do. You shouldn't be writing code in a language you don't like, you'll burn out. There are still plenty of jobs out there using other languages. And no, I don't think you'd be shooting yourself in the foot with it.

seandinan profile image
Sean Dinan

In my opinion, I would say it's because the world runs on the internet and JavaScript is essentially the only programming language available in-browser.

That does seem to be changing as WebAssembly gains momentum. Not sure if you're already familiar with it, but it might be of interest if you want to branch out into other languages (e.g. Rust, C/C++, C#) while still developing web applications.

tinkermakar profile image
  1. On one hand, JavaScript has the monopoly over the web browser -- the single largest avenue to most eyeballs in the world. Therefore, most web developers have to know it to some extent anyways.
  2. On the other hand, switching between multiple programming languages is pretty inconvenient -- it's annoying for developers and has a transition cost for the business.

Therefore, everybody is happy to make everything JavaScript.

JS is inevitable 😈

elsewares profile image
Brian Hollenbeck • Edited

I remember the day when I had to make a decision: either I was going to really commit myself to Ruby on Rails, or I was going to dive beyond jQuery and REALLY understand Javascript. I haven't regretted the choice for a day since.

Yeah, Javascript isn't perfect - but then no language is. The reason why Javascript is everywhere is because it became the lingua franca of the Web, and the Web,l far and away, represents the largest opportunity for employment or derivative income as a developer.

Yes, it's slower than Rust. Yes, its not as safe or ironclad as C#, yes, the Math library stinks when compared to Python. But! It's fast ENOUGH, TypeScript is safe ENOUGH, and with a Node/Deno/Bun runtime, I can bang together a server that binds to a Python or R or MatLab library that'll do the floating-point math FOR me. And I can have it done, tested and public-facing in a weekend.

fyodorio profile image

Unpopular opinion: JS (and TS too, consequently) is a beautiful and simple functional programming language. Once you know it and get to work with something else (including Go, Rust, Zig, whatnot), everything seems so bloody overcomplicated. And I don't mean the code, rather the mental concepts.

Again, I believe every programmer has such a langulage in mind (most probably some other than JS), that's totally the matter of opinions. But looks like there's just more folks that feel productive with JS (until they get stuck with performance implications, which to be fair happens not really often or doesn't happen at all for the majority of software products).

alexsherekin profile image
Oleksandr Sherekin

JS is not a functional language

benuuts profile image

My take is that the browser has become the universal operating system. Developers made the most of the only available language and became expert at it. Then started using it outside of browsers to have one and only codebase on the same technology.

ukw profile image

In my personal opinion Javascript doesn't rule the world, but it does run natively in browsers, so its only natural there are many developers that are inclined to use it more, partly because of the fact that most of the apps are now web apps and partly because of the familiarity. Its always easy to start with something like Javascript that doesn't need a compiler to run and its easy to catch up being so unrestricted and chaotic like you said. I think there are many developers as well. I started as a Flash ActionScript developer and since Flash died guess what came natural. Given the fact of the popularity of the Flash I can only guess I'm one of the many developers that ended up in Javascript land because of the familiarity of the language (since ActionScript is similar to Javascript) and of course the fact that they are both web apps.

Some comments may only be visible to logged-in visitors. Sign in to view all comments.