5 ms·
> The Rust re-write was the third attempt; the first two were in C++ and failed. AFAIK most of Firefox is still written in C++, JavaScript and C [1] The JavaS
by chinesempire 6y ago
> The Rust re-write was the third attempt; the first two were in C++ and failed.
AFAIK most of Firefox is still written in C++, JavaScript and C [1]
The JavaScript interpreter, which is particularly important to users perceived speed, is entirely written in C++
[1] https://4e6.github.io/firefox-lang-stats/ https://4e6.github.io/firefox-lang-stats/
- steveklabnik 6y agoI am talking specifically about the style engine, which is the topic of this sub-thread.
- chinesempire 6y agothe posts linked in the beginning of the thread talk about 51 memory safety bugs over the course of many years, from 2002 to 2018. Stylo has been the default CSS parser starting from the beginning of 2018. It's good that Rust could have avoided them, but is it a fair comparison? I think that when at Firefox they started to think about a new architecture to better enable parallelism they began improving considerably, Rust is only a part of that.
- steveklabnik 6y agoIf you watch the talk I linked below, you’ll see more details. They were, and tried with C++, and failed. Rust was key to the success.
- chinesempire 6y ago> If you watch the talk I linked below I've watched it several times over the past 2 years And I've read the posts about writing and HTML engine in Rust when they first came out in 2014 https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.html https://limpet.net/mbrubeck/2014/08/08/toy-layout-engine-1.h... and ported them to Elixir and still use them in my programming lessons > Rust was key to the success. For them It's important to specify that Rust, built by Firefox, lead to a Firefox success. Just like Dart, created by Google, is the language of choice for Flutter, also created by Google. I know you've been working at Mozilla to work on Rust and I believe Rust is very good, but I also think Mozilla could have used other languages, there were a few that could led them to success, but they understood this are times where the "means of production" aren't the machines but engineers tools, and creating a programming language is the best way to control part of that world.
- steveklabnik 6y ago> I know you've been working at Mozilla to work on Rust I haven't worked there in a year and a half.
- chinesempire 6y agoThat's a very short time span in human years. Anyway I wasn't implying anything bad, just that you worked for years at Mozilla on Rust and it's like asking Anders Hejlsberg if C# enabled Microsoft to do things that have failed before with C++ or if TypeScript is better than vanilla JavScript.
- leshow 6y ago> there were a few that could led them to success which ones? If they tried 2 or 3 times with C++ and the Rust one succeeded, what other information would you need to have to convince you that Rust was the differentiating factor? It seems like you just don't want to admit that Rust was the key to their success in the project, even when you have someone who was there telling you that it was. We aren't going to get research study levels of replication on large projects like this, so I don't know what standard you're looking for here.
- chinesempire 6y ago> what other information would you need to have to convince you that Rust was the differentiating factor? The fact that Chrome is doing just fine without it? > t seems like you just don't want to admit that Rust was the key to their success in the projec It seems like you are trying a classic ad personam, I agree that Rust was one of the changing factor, I also wrote it, but just for Firefox, not in general. Which is the original point of this sub-thread. > We aren't going to get research study levels of replication on large projects like this I don't think Firefox is the only large project out there. nor the largest.