Also, V8 is an incredible piece of technology, and is not that far off being competitive with Rust or C++. In some scenarios GC (by which I mean tracing) can outperform reference counting, or even Rust-style malloc+free. The event loop architecture is also very naturally fitted to user interfaces.
Ignore the HN opinionmongers and build with whatever tools you can work with. You'll be much faster and more flexible, and you'll gain an understanding of what the bottlenecks are, which you can use to do targeted optimisation later on :)
Purely from the user perspective I hate electron, because of its RAM usage. The speed argument is a straw man: Of course V8 is fast. And yes, VSCode is a very good IDE. But the problem is real world electron application don't scale down. In my (of course biased) experience even simple electron applications use at least half a gigabyte of RAM, often a whole gigabyte. If you're on a beefy 32gb machine you'll never noticed the difference. But on the 8gb machines most people around me use, these electron apps really take up a huge fraction of RAM. And swapping is definitely noticeable slow, even on SSDs. The "think about the planet" argument comes to play, when I need to upgrade my PC because RAM is the bottleneck. And seriously what fraction of the population even has the knowledge to only upgrade the RAM and not buy a whole new PC.
If I had to advise you personally, I might even tell you to choose electron. But be aware that you are using the "defect" option in the prisoner's dilemma: as everybody around you is choosing the societally harmful option of wasting resources you are at a competitive disadvantage to do the right thing. And also: electron has stolen mind share off of better solutions, so the documentation there is also not in the best place.
And even worse, those people I reach with my argument, and thus put at a competitive disadvantage because they are going the extra mile to do the rights thing, might be those that I want to support the most, because they might be willing to the right (IMO) things at other topics I value as well, like the importance of privacy.
So what is the conclusion? I have no idea how to fix our collective resource waste and it is hard to assign individual responsibility and I'm deeply dissatisfied by the whole situation.
I suspect the difference is because they are responding from a developer's mindset, not a user's. For devs, Electron really is the easiest way to make desktop apps, especially if one already has web experience. Users who dislike Electron are generally seen as a vocal minority (how many people use Slack or VSCode vs non-Electron variants?). But then you have this vocal minority congregating on HN, which is especially focused on speed, and you get comments like the parent linked, dismissing Electron.
The dev point of view is more prevalent in this thread because the linked article is all about how a dev failed to ship an app because they thought it wasn't good enough, which is exactly the problem Electron solves, even if it's worse for the user.
For developers who have never heard of Visual Basic, Delphi, or Free Pascal / Lazarus, Electron really is the easiest way to make desktop apps they know of.
There, FTFY.
To think that devs these days should use any of them is to be tone deaf to how the tech world works these days. Good luck convincing a dev, much less their boss, to use Delphi to develop their cutting edge desktop apps.
Libraries and support for what? Betcha 99 percent are for stuff that 99 percent of developers don't need.
> Good luck convincing a dev, much less their boss, to use Delphi to develop their cutting edge desktop apps.
Wasn't this a discussion about the single bloke working on his Minimum Maybe Viable Product? He's his own boss. And if he doesn't want to be convinced to use the best tools for that -- his problem, not mine. I was just correcting your factual error about the easiest way to make desktop apps.
I think the most likely conclusion is that once OSes are guaranteed to have a modern-enough browser engine (this is close to being true for Windows since they introduced WebView2), Electron could update their framework to use the system's native webview (or at least make it available as an option for the developer). This would bring back the problem of having to test in multiple browsers, but I'd rather test against an old version of Chromium, or even Safari, than have to test against the old Edge engine in WebView1.
Edit: Did some more reading, and the way Electron discusses WebView2 doesn't seem to imply that they're interested in integrating with it: https://www.electronjs.org/blog/webview2
But regardless, I think all it would take is someone else making a framework that uses native webviews and implements enough of Electron's APIs/tooling to be close to a drop-in replacement. (Then again, how many people are using Preact?)
Plus, there are tons of slow buggy apps that are written in c++, that doesn't guarantee performant software. Electron doesn't need to be slow either, VSCode demonstrates that. Especially for a solo dev or small team, electron is for sure the right choice for a desktop app.
Edit: the reason I tend to dislike electron is that apps don't often follow native UI trends, which is definitely a solvable problem.
Electron works great for some of those use cases.
The other stuff works great for other use cases.
Anyone giving general advice on that is giving bad advice, period.
I switched to using Tauri recently though, with the same sort of architecture - Svelte front end, Rust for the heavy stuff, and it’s working out nicely. It’s actually faster than the Mac app in most ways (and to be fair, Electron worked well too, but the installer size and startup time bugged me)
If you don’t like the bloat of Electron and don’t mind dealing with 2 browser engines instead of 1 (Webview2 + Safari), Tauri is worth a look. Doubly so if you already know some Rust. They’re still a bit early days in some respects, so it depends on what Electron features you need.
The only useful recommendation here is that, when you have some time, and don't have to rewrite an entire app, and if you expect to target the desktop again, you will gain from learning desktop frameworks. But absolutely not now while you are on the middle of something.