5 ms·
> Rewrite as much of Mercurial in Rust as possible, which will provide performance improvements well beyond what Python can possibly offer. https://www.mercuria
by dom96 9y ago
> Rewrite as much of Mercurial in Rust as possible, which will provide performance improvements well beyond what Python can possibly offer. https://www.mercurial-scm.org/wiki/OxidationPlan https://www.mercurial-scm.org/wiki/OxidationPlan
I read that article and I'm still wondering: why Rust?
- RantyDave 9y agoBecause he works for Mozilla.
- dingo_bat 9y agoThat is probably the only reason to use rust over go or cpp.
- catamorphismic 9y agoReally? The only reason?
- dingo_bat 9y agoOnly one I can see. Want speed and performance and safety? C++. Want easy multithreading? Go. Rust's only claim to fame is that Mozilla is dogfooding it.
- apta 9y ago> Want speed and performance and safety? C++. Speed and performance sure, but safety automatically rules out C++. > Want easy multithreading? Go Want speed, performance, safety, and easy multithreading? Rust.
- dingo_bat 9y agoC++ still does multi-threading better than rust, just that go does it better. Similarly go does perf better than rust, just that cpp is even better. So yeah, if you want the worst of all worlds coupled with the pains associated with a brand new language (try compiling rust for a armv5 soc) rust all the way!
- greenhouse_gas 9y agoCan you show a benchmark where Go outperforms Rust?
- geofft 9y agoThe last three paragraphs of the section "Why use Rust?" should address that - basically, they have experience with solving this problem by writing parts of the code in C, they are not fans of that experience, and Rust is a compelling better C (and there are specific reasons they don't think C++ is compelling). Are you asking in comparison to some other language? The most obvious other languages in the "compelling better C" niche I think are Ada, D, and Go; Ada and D (I think, I do not know them well) don't have as good of a standard library or outside development community, and Go is less suited to Rust to replacing portions of a process. Go would be a reasonable choice were one writing a VCS from scratch today.
- quotemstr 9y agoThe C++ rationale is bizarre. That a 2008 compiler doesn't provide modern features is unsurprising. They've chosen to use Rust is a strange reaction to this limitation, since it would be just as easy, from a toolchain perspective, to just use a modern C++ compiler.
- adrianN 9y agoLanguage features aside, Rust is a lot nicer to work with because it has cargo and using libraries is no longer a pain.