Conversation

Replying to
Unfortunately (imo), Mozilla stopped working on Servo. As a result, Mozilla uses Rust today not on a new browser from scratch, but to (re)write parts of Firefox, a mostly-C++ codebase. 2/10
1
116
What if Mozilla's original plan were what it ended up doing in practice: incrementally improving Firefox? That is, imagine that there never was a Servo project. Instead, ~10 years ago Mozilla invented a language for incrementally making Firefox more memory safe. 3/10
1
83
In that hypothetical, maybe Mozilla would have ended up creating a language more like Carbon than Rust: something designed to allow easy migration from C++ on a per-file basis. Obviously, Rust benefited from how things actually happened: no C++ baggage. 4/10
1
138
What I think is a harder question is whether *Firefox* would have been better off or not. Imagine if several years ago Mozilla had created "Carbon" instead of Rust. Far more of Firefox's C++ code would have been replaced by now. But that code wouldn't be as safe as Rust.⚖️ 5/10
2
120
I'm speculating that far more C++ would have been replaced because 1. Carbon lets you replace on a per-file basis, so Firefox devs could have started replacing C++ everywhere in Firefox immediately. 2. All the engineering effort on Servo could have been put on that. 6/10
2
81
I'm also speculating that that approach would lead to less safety, since the C++ interop requirement of the "Carbon" path makes it difficult to get Rust's guarantees. Carbon does plan to have a safe subset eventually, but how that ends up is still unclear I think. 7/10
1
73
Other speculative points: Maybe Mozilla would not have focused on C++ interop even if the goal was incrementally replacing C++ in Firefox? And, would creating Carbon have taken the same amount of time as Rust? 8/10
1
58
Also worth mentioning that even though Mozilla stopped working on Servo, a lot of great stuff come from it: feedback for Rust and code&ideas for Firefox. So even regardless of the memory safety issue I'm not sure any alternate history would be "better". 9/10
2
73
Still, just on the specific topic of memory safety: would Firefox have been safer today with the "Carbon" path of replacing more C++ more quickly, but less safely? That's a tradeoff I'm not sure about. 10/10
3
79
You’re unable to view this Tweet because this account owner limits who can view their Tweets. Learn more