3 ms·
Look, I get it, "less web apps" is an easy post to write these days, but all I ask is that we tone down the FUD. Let me just pick off the inaccuracies that will
by felixrieseberg 6y ago
Look, I get it, "less web apps" is an easy post to write these days, but all I ask is that we tone down the FUD. Let me just pick off the inaccuracies that will likely stick the most:
> But building for the web(and electron) forces you to HTML/Javascript(and derivates).
This is incorrect. Electron supports Objective-C, C++, Rust, and obviously WASM (amongst others). If you want to build native code (and native UI) in any of these languages, go for it. Countless Electron apps have native components.
> It has no type safety, memory leaks are common and it’s slow due to its dynamic nature.
TypeScript has been a thing for a while now. [Citation needed] for the statement that memory leaks are more common than in, say, C++. Slow: Yes, it's slower, but probably by _a lot_ less than you think[1].
> And it’s laughable how weak the browser platform itself is. SQLite is available on raspberry pi, embeddable systems, mobile platforms and just about every other platform on the planet.
I agree, SQLite is fantastic. We don't really have to argue whether IndexDB will get thee job done, because native bindings to use SQLite with Electron exist. Just... use it.
And lastly...
> These days to send a text message over Slack I need over 1GB of RAM. [...] Even basic apps with all of their trackers, external javascript scripts and doms take up 100s of MBs in memory.
We're always working on performance and we're quite far from the place I'd like us to be at, but it'll send your message just fine if you have less than one GB of memory installed in your whole machine. Even if you're a heavy user, your memory _should_ be below one GB. To be clear, I'll say it again: Yes, things should be better and we'll keep working on performance. The post mentioned Instagram earlier, which I'd say goes a bit beyond the most basic app, and it's using a humble 40MB on my machine.
Disclaimer: I'm one of the maintainers of Electron and an engineer at Slack. I'm not here to argue opinions or which tool is better for which job, but we should get the basic facts right.
[1]: https://www.youtube.com/watch?v=81CECdKCJNc https://www.youtube.com/watch?v=81CECdKCJNc
- thayne 6y ago> TypeScript has been a thing for a while now. Yes, and typescript is great. But you do need a rigorous approach with it to get type safety on parr with languages like java and c++. And since that type information is lost by the time it gets to the interpretor, it provide any benefit to performance. For example, the js interpretor has to check the types if operands at runtime to perform addition. JIT compilation helps a lot, but if the interpreted language had stronger typing, the JIT compilation could probably do an even better job, since it could make more assumptions.
- dreamcompiler 6y agoWASM cannot touch the DOM so C or any other HLL (besides JS) in Electron is strictly limited to the backend. That's not useless but it's certainly a limitation. For the amount of energy one would have to expend to make an Electron app reasonably performant and less of a resource pig, you might as well just write a native app. After all isn't the whole point of Electron to get to MVP the quickest? Electron is a great prototyping tool, but it's a lousy delivery platform.
- guilamu 6y agoHello, I just like to add that I never understood how when I just try to edit one of my Slack message (Windows client) it literally takes 100 % of 4@4ghz i5 cores and freeze my system for 2 seconds. I mean, come on, I'm not asking the impossible here, just editing a single line of text. I hope one day you go native like Telegram for example which is blazing fast, ultra light and also has clients on Android, Mac, etc. Bests,
- entha_saava 6y agoThere are some alternative slack clients.