3 ms·
Engineering is a matter of tradeoffs. With JavaScript, you get simplicity but lose strict typing (can be compensated with TypeScript), performance etc. Rust giv
by rwalle 3y ago
Engineering is a matter of tradeoffs. With JavaScript, you get simplicity but lose strict typing (can be compensated with TypeScript), performance etc. Rust gives you much better performance but is more complicated to write. However, for a lot of the websites out there, especially those that are not e-commerce or provide creative tools (e.g. Figma) and do not care that much about page performance, the potential performance gain from rewriting JavaScript code in Rust is not visible enough to end users. Of course there are bad websites out there that are slow, but it is often more about CDN/backend servers/the UI code itself rather than the JavaScript language. In other words, many websites are "fast enough", and most CTOs, product managers and developers would rather use JavaScript/TypeScript and release more features rather than write Rust, in the real world.
Same thing for a Rust replacement for VSCode -- I am sure it is an interesting project, but VSCode performance is generally good enough (I don't ever complain about slowness while developing). A lot of the performance bottleneck comes from the language services anyway. If you improve the loading speed from 2s to .2s that is definitely great, but if at the cost of losing most of the existing extensions, I'm not going to consider it at all.
- MuffinFlavored 3y agoTo me it's like a curve. Yes you can technically maybe get off the ground more quickly up front with JavaScript, but as soon as you hit a certain code base size threshold (not sure what it is personally, it is probably different case by case), you would've been better off with TypeScript or Rust as JavaScript starts to "crumble" under its own lack of types, etc.
- flanbiscuit 3y ago> However, for a lot of the websites out there, especially those that are not e-commerce or provide creative tools (e.g. Figma) and do not care that much about page performance, the potential performance gain from rewriting JavaScript code in Rust is not visible enough to end user Agreed. I would hate to see a CRUD spa written in Rust just because it was the fancy new thing. But sites like Figma, Miro, and Frame.io would make sense to look into a Rust WASM solution. > but VSCode performance is generally good enough (I don't ever complain about slowness while developing). The one thing I would say it can't handle is large files, like a large JSON file, I'm talking really large. It's something Sublime could handle and I used to keep it around just for that. This is not something I deal with often enough to really annoy me.
- camdenreslink 3y agoThis is probably true for the actual business application itself. It would be cool if we can get an ecosystem of performant WASM libraries that your JavaScript/TypeScript can use and be none the wiser.
- sneed_chucker 3y agoJavascript has pretty solid performance, assuming the code is half decent. Honestly, a major benefit of strict/enforced type systems is that it substantially improves maintainability of the codebase. Large Python or JavaScript projects with no typing can be a huge nightmare.