id say it could be worse it could be written in dhtml but that’s pretty much better than js these days
Javascript turn our computers into toasters
You know what they say! All Javascripts Toasts Computers!
And our toasters into computers
That would be java i guess
I that’s me😁
JS has saved me many hours of mind-numbing, error-prone manual keyboard work by giving me a way to hack together a simple bit of automation as a web page.
Even when a computer has been ham-fistedly locked-down by an overzealous IT department, I can almost always still access a text editor and a browser that will load local HTML files.
The amount of work I have completed with Tampermonkey in situations like this should have made that same IT department quite anxious.
Add to that the beauty of bookmarklets.
It’s silly that IT departments forces us to resort to techniques used before browser extensions became a thing, and it’s ironic that it’s because they don’t know how to code, but here we are.
Genuinely curious, how many of you hating on JS have done professional frontend work recently? If you have done professional work, was it part/full time, using TypeScript, how big was your eng team, did you have to worry about Server Side Rendering? Maybe some extra context will show certain types of projects yield devs that hate the language.
So true.
Unless you are making a HTML/CSS only site (based) what do you want to use instead?
Kotlin/JS would be my first choice ( ͡° ͜ʖ ͡°)
Invent a new internet where you can script pages directly in Python or TypeScript.
Otherwise, you get to enjoy a silly toy language from the 90’s.
I’m 100% sure I can make Rust code (not even compiled to WASM) run natively in a browser like Firefox, given I have enough will power, time, energy, and money. The problem is getting everyone else to agree to this new standard.
In a scripting language, is there an advantage to no garbage collection? (I honestly don’t know)
Someone else also pointed out to me, when I made a similar suggestion, that ability to partially fail but keep going is desirable in a web context. I don’t know, maybe there’s some way to make Rust do that more automatically than C. Python seems the be the standard for general-purpose scripting, which is why I mentioned it.
I’m on, but no one is interested.
I worked in heavy JavaScript codebases back in the IE days and wasn’t too crazy about it. Then JIT compilers like v8 came along and made it run a lot faster and TypeScript also made it more usable for larger codebases. I now consider TypeScript among my favorite languages. I’ve also written a lot of Go lately, and while I appreciate its speed and smaller memory footprint, the missing language features kind of grate on me and I don’t mind taking a bit of a performance hit for the (IMO) superior ergonomics of TypeScript, especially for workloads where I/O is more of the bottleneck than compute.
agreed. typescript is excelent, especially if you make it strict and know a bit of complex types to make sure things stay put.
Chiming in as a professional TS dev. It’s really a joy to do web dev work in the post TS world.
i wish a more performing language would have this type system. the only other ones I know are Rust which is a bit strict and slow to dev on, and Haskell which is too much.
Fully agree.
I hear good things about OCaml? Anyone tried that?
I asked chatgpt for a few languages with a good typesystem and it suggested ocaml among other (scala, rust, haskell, f#)
Then asked for a 100 line ocaml REST API example with a popular framework and db lib… and it looks mostly like Haskell.
edit: async is done with monads
If it looks mostly like Haskell but has better tooling, I’m in. I have yet to manage to successfully set up a Haskell environment on my own PC. 😅 I am obviously missing something.
I used it either through my distro’s package or using stack install. there’s also cabal install, but that doesn’t install the compiler, at least not in 2017 when I played with it.
I think ghcup is the simplest way
What do you think of JSDoc? As someone who knows neither I find the idea of no required transpilation very appealing, while still getting the TS ecosystem tools.
Why is transpilation unappealing to you?
Being honest, I’m an outsider looking in. Most likely these things are solved problems, but alternates are always interesting to hear insider opinions on.
Sounds like it’s developer experience Vs required post processing in this case, which is a reasonable tradeoff to think about
JSDoc is much more cumbersome than using TypeScript. That’s it. It clutters the code in a way that TypeScript somehow avoids. TS types are smoothly integrated in the code itself, IMO. Not as much the case with JSDoc.
Thanks! As a hardware guy it’ll be a long time before I do anything with this information. Nice to hear the opinions of actual Devs.
I suspect most Lemmy users hating on JS haven’t done much professional JS work. Especially these days with TypeScript and all the modern conveniences.
I’m curious, what kinda hardware do you work on?
Digital hardware, mainly top-level design in verilog and associated checks using python/perl (sad)
Right now working on a GPU which is fun!
Ah alright 🙂 My pleasure! Yeah I wouldn’t even consider JSDoc if I had the choice of TypeScript. I even did some years of Advent Of Code in TypeScript. It’s performant enough and simple to employ some kind of quasi functional programming style with it. I think it’s great.
I think Rich Harris famously migrated Svelte from TypeScript to JSDoc, while still supporting TypeScript via JSDoc. I don’t use Svelte, so I have no idea how well this works in practice. However, Rick Harris seems smart to me, unlike other overly opinionated devs like DHH. I still wouldn’t use JSDoc over TS, but I guess if it works for your project, who cares. What matters is that we all remember the one true enemy, DHH
It’s funny because I learned to program with strongly types languages and when I moved over to JavaScript I always complained about it for the longest time but now that I use mostly typescript at work I kind of miss some of the old JavaScript patterns and their flexibility. But for working with large teams or large projects in general it’s nice to have typescript
I’m in this photo and I don’t like it.
More specifically, my programming background is in industrial automation and I’d like to add some more ‘robust and flexible’ algorithms to CoolerControl so I can control my system fans / temperature better, but it’s written in a mix of TypeScript and Rust.
I’ve spent 20 years programming hard real-time z80 assembly and know quite a few higher-level languages. (Although I prefer the lower-level ones.) Not those ones, however, so it’s not just a couple of hours work to raise a PR against that project. Going to need to crack some books.
I like JavaScript a lot and would be excited by its use in this context.
The Cinnamon desktop environment found in Linux Mint uses JavaScript on the back-end. My knowledge doesn’t extend much beyond that (other DEs, and what they do, nor the full extent of JS in Cinnamon), but I did look at it at one point.
Makes me wonder if OP was talking it about that in particular or if there’s some other project with a bundled JS interpreter they decided not to work with.
Written in PHP
JavaScript really depends on the people writing it restricting themselves to a sane (ish) subset, just like C++
My personal gripe with JavaScript is how horribly slow it is. C++ at least has the merit of being fast once compiled. I wouldn’t feel great contributing to a JS project knowing fully well that a rewrite in a faster language would be 10x as effective as anything I could improve as is.
That’s funny because I - having not written much C++ - have an irrational hate of the language. But I like JavaScript. I think I need to look at C++ through the same lens I look at JS through.
Imo you can write pretty performant websites in JS. I guess it depends what you’re doing, but e.g. if you pay attention to you’re rerenders in React, you’re gonna have a much better time.
But I also totally understand as soon as you wanna do some compex stuff, JavaScript is not a good time. I don’t think webassembly has worked as smoothly as promised, but in theory, that should let you bring some C++ into the browser.
JavaScript is great for making websites !
A few lists of javascript WTFs:
- https://javascriptwtf.com/
- https://github.com/denysdovhan/wtfjs
- https://wtfjs.com/ (last updated 2016 but most of these things can/will never be fixed)
To anyone who thinks they know JS well and that its quirkiness is not a problem, let me know how you do on these quizzes:
this quirkiness doesn’t materialise in real world applications on any scale that makes it harder to deal with than the alternatives.
I got a little under half in the first two, which I’m very happy with haha. JS certainly has some quirks, but you’ve really got to go looking for them IMO. TypeScript resolves most of these issues with comparing types, and the rest aren’t that unique to JS.
You’re not wrong, but newer version of the language have steered devs away from these quirks. The quirks remain because the JavaScript language is 100% backwards compatible. It’s fun to laugh at these quirks, but I’ve been a full time JavaScript developer for 4 years and part time since 2015, and I’ve never seen any of these quirks come up in the real world. If you tell your developers to use === instead of == in code review, you eliminate most of the problems imo.
JavaScript tooling deserves more hate imo. The ecosystem is kinda a disaster, but Vite is making a lot of progress in fixing that. If you ignore React Native and metro bundler, I think the state of web is looking pretty optimistic right now. At least from a technology perspective. From a business/AI/enshitification perspective we’re cooked lol
Some of the best software is written in JavaScript.
- Uptime Kuma
- Immich
- Supabase
- VS Code/VSCodium
- Ionic (what the Voyager Lemmy client is written in)
- Expo/React Native (which powers probably a third of your apps)
This doesn’t really conflict with the post. They use and appreciate the software, so presumably it’s decent. You can write good software in any language, so it doesn’t prove that the language itself is good. IMO JS is a popular language, not a good language.
What makes it not good?
The completely bizarre implicit type conversions, for one thing.
I’ve never really found the type conversions that bizarre, unless you’re doing something weird like casting an array to a string or number. I don’t really use strange type casts, since I use TypeScript and avoid using the “==“ operator. What other things make it not good?
If you use typescript you will obviously never see the weird type system of JavaScript
still possible, typescript is only strongly typed if you and everyone else working on the project wants it to be.
Considering TypeScript is a superset of JavaScript, you certainly can. But, that generally means you’re using TypeScript poorly.
Just look up the video entitled “wat” which is mainly about JavaScript
I mean, just the fact that you’re using TS instead of plain JS (and that TS even exists) should tell you that the language has issues…
It’s just strict typing on top of plain JS. I like strict typing. Some people like loose typing.
I’m pretty sure most people do not like JS’s loosey-goosey, who-knows-what-ur-gonna-get type system, which is why TS is so popular. Not really surprising since the bones of the language were basically spat out in a couple weeks. TS is a custom type system on top of JS, meaning it’s not just JS’s type system expressed through strict typing. They added a bunch of useful features like discriminated unions and so on to make using TS more pleasant than raw JS.
TS is actually usable (although NPM and the environment built around it still suck). It’s inherited a bunch of weird shit from JS, but the type system generally makes them bearable.
I started my career with Visual Basic (3!) and I appreciated the loose typing because it meant I could get going and actually have something running quickly as a newbie. A few years later I switched to C# and saw how an entire class of errors disappeared because of the strong typing. Both have their place, depending on the skill level of the coder and the needs of the application.
Yes, if you do silly things with JS, you generally get silly results instead of TypeErrors. I wouldn’t say that makes the language bad. It makes the language resilient to bad programming, which you’d generally want in the case of web pages.
VS Code is a good software? I beg to differ. It’s slow. It’s messy to look at. It’s resource hungry.
If you think VS Code is a good editor, we can make an even better editor in another language.
It is resource hungry. I’ll give you that. But it’s neither slow nor messy to look at. Have you ever used NetBeans or Eclipse?
You are comparing it to Eclipse. I also give you that.
So uptime kuma being written in JS proves what about the language?
90% of the worst software and websites are made in js
Well, all websites are written in JS (on the frontend), so I don’t think that’s fair. And I don’t think 90% of the worst software is made in JS. Even if you’re an Electron hater, Electron apps aren’t bad software, they’re just bloated. There’s tons of shit software written in C. I would guess a lot more than is written in JS, just because more software is written in C. C is also way easier to shoot yourself in the foot.
Uptime Kuma (and others) show that JS can be used to make awesome software. The language doesn’t really hold you back, it’s just your own skill. If you suck at writing software, it doesn’t matter what language you use, your software will be shit.
So any language is good as I can make great software using it?? IMO js is still a mess and NPM is really full of shit code to prove it.
I didn’t say that. You can make great software in Brainfuck, but I don’t think anyone has ever said it is good because of that.
People do make good software in JavaScript. Knowing JavaScript is an exceptionally useful skill, and JavaScript is pretty easy to become decent at. The learning curve for JavaScript is relatively low. As such, there are tons of JS devs, many of which want to make cool things. JavaScript is undeniably an approachable language. Whether you personally think it’s a good language doesn’t have any bearing on that, but that means tons of people are going to use it to make cool software. To me, its approachability is one of the many things that make it good.
Well, all websites are written in JS (on the frontend)
Not true anymore unfortunately, some sites are using frameworks compiled to WASM instead.
e.g. X is apparently using Yew now.
Edit: Ok the “apparently” is doing heavy lifting, since now I can’t find the original source I read about it. Turns out “X” is a garbage name with no searchability, only an idiot would use it.
Taking Immich as an example, there’s a lot of heavy lifting happening there behind the scenes in external libraries that are not written in JS.
It’s written for Node and Svelte. But sure, just like nearly all other software, they use external libraries.
Using only VSCodium in this llist. But not much, because i always have to close it on evening, or the casual game with 300 mods wouldn’t run beside it and the webbrowser reserving about half of my 32 GB RAM.
Your VSCodium reserves ~8 GB of ram? You might want to check the extensions you’re using. I’ve got mine running with tons of open files and it’s using ~2 GB.

Also, you should definitely give Immich a try. It’s an awesome piece of software.
Technically typescript. I know it transpiles to J’s but half the complaints I read are about the typo conversion and so on, which ts heavily alleviates.
I like minecraft










