DEV Community

Cover image for Discussion of the Week: "Why is everything JavaScript?"
Michael Tharrington for The DEV Team

Posted on

Discussion of the Week: "Why is everything JavaScript?"

In this weekly roundup, we highlight what we believe to be the most thoughtful, helpful, and/or interesting discussion over the past week! Though we are strong believers in healthy and respectful debate, we typically try to choose discussions that are positive and avoid those that are overly contentious.

Any folks whose articles we feature here will be rewarded with our Discussion of the Week badge. ✨

The Discussion of the Week badge. It includes a roll of thread inside a speech bubble. The thread is a reference to comment threads.

Now that y'all understand the flow, let's go! 🏃💨

The Discussion of the Week

Give it up for @shinyvision who shared the excellent discussion "Why is everything JavaScript?"

Rachel questions why JS is so dominant, noting that they find so many other tools to be more interesting, yet JS seems to be omnipresent. What follows are a multitude of thoughtful and interesting responses from different folks in the community...

For instance, @lexlohr weighs in with some good context as to why JS has become so far-reaching:

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.

Meanwhile @miketalbot mentions personally being hooked by it's Write Once, Run Anywhere feel:

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#

@peerreynders provides thoughtful and well-sourced guidance with this comment. EDIT: Note that I had this comment embedded, but because it included embeds, I think the embeds within embeds were causing some issues.

Anyway, the answers don't stop there. Plenty more interesting responses to dig through in the post itself. Got something to add to the conversation, what's stopping ya? Get in there and share your thoughts with us!

What's your pick for the Discussion of the Week?

The DEV Community is particularly special because of the kind, thoughtful, helpful, and entertaining discussions happening between community members. As such, we want to encourage folks to participate in discussions and reward those who are initiating or taking part in conversations across the community. After all, a community is made possible by the people interacting inside it.

There are loads of great discussions floating about in this community. This is just the one we chose to highlight. 🙂

I urge you all to share your favorite discussion of the past week below in the comments. And if you're up for it, give the author an @mention — it'll probably make 'em feel good. 💚

Top comments (6)

moopet profile image
Ben Sinclair

Because node made it easy for people to become package-famous.

When node came out, people with experience of developing scripts for browsers found there was an easy way to make back-end contributions, and that there were already a lot of ideas to steal.

Is there a package that does X, Y or Z but it's written in C? Python? Ruby? Then you copy it in node and become an instant package maintainer, which looks cool on your CV. You don't need to do any of the R&D.

To be clear, I'm not saying there's anything wrong with this; it's fun to rewrite things in your favourite language and it's a great learning experience for everyone. It has also lead to a huge package repository (for better or worse).

But the incentive of a new goldrush combined with the familiarity of the language made Javascript what it is today.

nimit2801 profile image
Nimit Savant

Simple, the language is understandable from its syntax. I feel there is nothing complex when you're starting. There are no such fundamentals which it is proposing or are unique to the language. But soon you move on and want to do something complex you'd actually start needing the type system to efficiently work with it. And soon the comfort of the language hits you where you start making solutions and npm packages for yourself. Once you start doing everything in it and community making literally and building around NodeJs. You find yourself so deep into the language that it becomes your goto and you start searching solutions in that language.

elsyng profile image
Ellis • Edited

I think it is relevant here to to point out that, imho, one of the main strengths and points of React (which is a large consumer of Javascript) is:

  • using a subset of Javascript, and enabling us to avoid the rest of Javascript (such as global scopes, closures.)

So in that sense, React at least, is half-javascript. React has been so effective, successful, popular, exactly because a large web application written in pure javascript is typically a nightmare to maintain. React uses a subset of javascript in well-contained small capsules.

And in that sense, perhaps everything is not javascript.

iskandarreza profile image
Iskandar Reza

JavaScript didn't fully click in my smooth brain until ES6 so I agree with Alex that 2015 seems to be the turning point where it got real good. By now, vanilla js is amazing, you could do so many things easily without a single extra framework.

codewithshahan profile image
Programming with Shahan

JavaScript = Frontend + Backend

Popularity = Developers have no issue with it + unlimited libraries.

psimondk profile image
Palle Simonsen

In my experience good programmers never have an issue with JavaScript