2 ms·
As someone who is firmly ( _firmly_ ) in the "nobody can write good manual memory management code" train, zig is probably a better fit than rust here - and this
by zamalek 3y ago
As someone who is firmly ( _firmly_ ) in the "nobody can write good manual memory management code" train, zig is probably a better fit than rust here - and this is one of the extremely rare circumstances where I would pick zig over rust.
Tree-sitter is written in C - the memory benefits of rust are completely moot. Zig also has a built-in C++ compiler, so you could generate the object file with a single toolset.
- hazebooth 3y agoI chose Rust here because that was what the command line tool that I referenced were written in. I'm not going to argue on HN about memory management (because I too, prefer Zig over Rust) because it's all about the program you're trying to write. In terms of generating the object file with a single toolset, It's just not something I care about. This was like, a two day project. I don't need to make it more complicated than it needs to be