Hacker News new | ask | show | jobs
by rapsey 259 days ago
Because they are grasping for reasons not to learn Rust.
2 comments

Their reasoning is reasonable. And besides, when your existing team is already proficient in Cpp, arguing that "they should learn X instead" seems very risky and unwise.
Then just say so and it is fine. We are a team of c++ experts and we are able to build a high quality program in C++ is a completely valid unassailable reason. Except for the most ardent rust fanatic.
Rewriting an existing working codebase rather than committing to its incremental improvement is usually a sign of bad decision making. So I'd be concerned if a team that had an existing mature codebase in C++ and a team of engineers hired on that path were taking on such a venture.

But that's kinda... not a bloggable topic, frankly.

Rust was designed to facilitate incremental rewrites of an existing C++ library, making cross-language testing and validation very ergonomic; why C++ developers rarely take advantage of this (or even account for it as an option in their analysis of alternatives) is an exercise left to the reader.
> Rust was designed to facilitate incremental rewrites of an existing C++ library

Do you have a source for this claim? Rust is a fine language (though its advocates can be a bit belligerent sometimes). But, as a matter of fact, Rust was not designed for a easy interoperability with C++ or to make gradual rewrites easy.

One design constraint of Rust was to be able to be incrementally included in a large C++ codebase: Firefox.

It turns out that this kind of interop with C++ directly is extremely difficult, and so it isn’t super smooth right now. Interop with C was prioritized and you get zero overhead there. And various projects ease Rust <-> C++ via the C ABI.