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)
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.
For me, I use JavaScript because it's the closest thing to Write Once, Run Anywhere with no compilation step.
I say this as someone who comes from a C, C++, and Java background with a decade-long sojourn into C#
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:
Bash is a terrible as a programming language, but what's the alternative ?
Jean-Michel (jmfayard.dev) ・ Feb 16
'cos you can build anything with it 🫣
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
funnyannoying 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...
The universal truth is that there is no need to love JavaScript (or TypeScript).
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...
Why Efficient Hydration in JavaScript Frameworks is so Challenging
Ryan Carniato for This is Learning ・ Feb 3 '22
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
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.
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.
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.
Some comments may only be visible to logged-in visitors. Sign in to view all comments.