3 ms·
Doesn’t the type checker have to run in JavaScript to fit into VS code? A C# implementation would be much faster, no need to go native with C++/Rust (not sure s
by seanmcdirmid 2y ago
Doesn’t the type checker have to run in JavaScript to fit into VS code? A C# implementation would be much faster, no need to go native with C++/Rust (not sure speed in Go would really compete).
The big issue is dealing with a structural highly expressive type system, the language of implementation is only going to be a constant slow down (but that constant can be large).
- mook 2y agoDon't a lot of the linters run externally via language servers? I'm pretty sure the rust linters are rust-native for example.
- Quothling 2y agoIt depends on which typescript toolset you use, but generally speaking you're probably riding on mix of C++ and Javascript if you're using VSC. VSC itself uses C++ in it's core components since that is how electron works. Similarly the language server and tooling for both Typescript and Node are build with C++. If you're fancy and use Bun you're running on Zig. Eslint itself runs on Javascript, but the parser it uses feeds it something called an abstract syntax tree, and different parsers will do this differently. So the relatively simple answer would be no, it would not be faster with C# (or Go which would likely have a similar speed to C#).
- seanmcdirmid 2y agoC# should be faster than JavaScript, at least, given all the optimization Microsoft puts into the CLR. But it might not be super portable. I’ve never seen the typescript type checker before, but I wouldn’t be surprised if it were in typescript, which is common as these things go.