3 ms·
> It replaces approximately 160,000 lines of C++ with 85,000 lines of Rust Wow! This is great, especially considering how bad and complex (in the bad sense) C+
by jsf666 9y ago
> It replaces approximately 160,000 lines of C++ with 85,000 lines of Rust
Wow! This is great, especially considering how bad and complex (in the bad sense) C++ is. Maybe Rust and Go will finally make the Frankenstein go to sleep
- zellyn 9y agoIs this reduction in line count typical? I'm surprised. Or is this discounting parts of the code that have been moved out into separate crates?
- Rusky 9y agoThere's some good discussion of how it happened here: https://www.reddit.com/r/rust/comments/7cwpbq/fearless_concurrency_in_firefox_quantum/dpt9gq0/ https://www.reddit.com/r/rust/comments/7cwpbq/fearless_concu... One of the biggest contributors is "custom derive," which cuts out a lot of boilerplate. Another is that Gecko C++ is also pretty old and so doesn't rely on a lot of what is now standard. It's also just a ground-up rewrite, which has the advantage of hindsight. It's not a trick of moving code around.
- zellyn 9y agoOh, thanks. Perfect link. It makes sense that rewrites are smaller, but the reduction factor was still surprising.