4 ms·
Picking a random example from the article: "Deno’s linter, code formatter, and docs generator". Why you need to write a tool like this in low-level system langu
by vzaliva 5y ago
Picking a random example from the article: "Deno’s linter, code formatter, and docs generator". Why you need to write a tool like this in low-level system language like Rust? And please, do not answer "performance" because: a) it is not critical for tool like this b) many other high-level modern languages for this type of project will give performance only marginally inferior to low-lewel implementation in Rust or C.
- VWWHFSfQ 5y agowhat should it be written in
- bruce343434 5y agoJavascript
- deleted 5y ago[deleted]
- pjmlp 5y agoAny AOT compiled language would do, nothing special about Rust magic dust.
- nicoburns 5y agoJavaScript linters and more specifically the TypeScript type checker are one of things that slow my computer down the most at work. Probably doesn’t help that I have 7 projects open at once, but that’s the nature of working a micro services based code based. Performance absolutely matters for this kind of code. Many other high levels languages might give you the performance you need, but JavaScript won’t, and not many languages are as nice to use as Rust. So if you have to do it in another language then it’s a good pick.
- Asraelite 5y agoI use Rust for a lot of things where performance is completely irrelevant. It has a lot of nice features and benefits other than memory safety and performance.
- howdydoo 5y agoI'll go ahead and answer "performance". People are switching to these faster tools because speeding up the edit-compile-run cycle speeds up their work. Yes, it's theoretically possible to write fast tools in JS, but somehow after all these years and millions/billions of dollars invested in the V8 JIT, they are all still slow enough that people will switch to newer tools, with fewer features, purely for the performance win. And these new tools end up faster with little developer time spent on profiling/optimization, because performant code is in the pit of success. I also wouldn't think of Rust as a low-level language. It has plenty of high-level features like macros, typeclasses, iterators that are nicer than in JS, etc. Speaking as a developer, these make Rust much nicer/faster to use than other languages that lack these things.
- cookiengineer 5y agoIt's nice how you mentioned billions of dollars in the same sentence as v8. As if your assembly-run CPU would be magically faster running three damn gigabytes of code in another language. JS isn't the problem. Babel is the problem. And every library using it, instead of using ES2020+ directly because every Browser supports it anyways. NPM needs an ESM modules based header files system, and packages should be not binary, not uglified, but maintained by a standard of expectations what a library can and cannot do. Split up header files, namespaces for definitions, and expected types for all functions. "Still using phantom? Sorry we block your package because it's outdated." "Compiling to es5 commonjs with ie6 setting? Sorry, your package is outdated." The ecosystem in JS has become a joke not because of the language, but because of the tooling. And now writing tooling in another language to replace that tooling will just end up in the exact same state all over again. For the love of Rust, please don't fuck up rust crates the way the Babel fatigued ecosystem did. Don't go the micropackage way, it didn't work and it's time to reflect on that, and build up a standard library in a more centralized way.
- pjmlp 5y agoIt is more about fashion and being afraid to have the right words on the CV than anything else really. Any AOT compiled language would produce the same performace results.