top | item 45416562

(no title)

joz1-k | 5 months ago

> 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.

discuss

order

steveklabnik|5 months ago

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.