8 ms·
In this context I believe that the rewrite benefitted Firefox more than Rust At Firefox they already knew the problem they were trying to solve using Rust, the
by asjw 6y ago
In this context I believe that the rewrite benefitted Firefox more than Rust
At Firefox they already knew the problem they were trying to solve using Rust, they already wrote that software, already discovered many of the overlooked complications involved in writing a modern browser, so, in conclusion, even a rewrite in plain C would have solved many of the bugs.
The simple operation of rewriting the same software with previous knowledge of how it works usually leads to simpler code (at the cost of developers time)
Firefox is also the entity that invented Rust, so it's in their best interest to publicize it as "the final weapon" against bug, but "if we had used Rust from the beginning these bugs would not have been possible" is just wishful thinking.
Rust itself could not be there without the browser war and the pressure that contemporary web puts on software that runs it
And it'been C/C++ that has driven us there
- k__ 6y agoTo me it leads to exactly the opposite conclusion. C/C++ or it's developers couldn't deliver, so they went a very risky direction that led to success.
- alex_duf 6y agoI think Rust is pretty much a meta-rewrite. The same way you describe a team learning from an existing product (CSS parser) what needed to be addressed, they applied the same logic but one level higher: on the very tool they were using. I think it's clever, it was risky but it seems to be paying off.
- phyzome 6y agoMozilla developed Rust specifically for this kind of rewrite. That was the entire point of it. (As relayed to me by one of the designers in 2011 or so.) They didn't think just a rewrite in C would be enough, they didn't think any other existing language would be sufficient, and then they went off to design Rust. So the statement "Firefox is also the entity that invented Rust" kind of misses the point.
- ReactiveJelly 6y agoSome people seem to think Mozilla gets royalties every time you invoke rustc. And that if I just took off my rose-tinted glasses, I'd realize my Rust code is buggy, unsafe, slow, and hard to maintain, and the only reason I'm using Rust is because of hype. It was pretty hyped when I started using it, in 2015.
- chinesempire 6y ago> And that if I just took off my rose-tinted glasses, I'd realize my Rust code is buggy, unsafe, slow, and hard to maintain I didn't get the impression. I understood that Firefox talks about their success in rewriting in Rust because it's their language, they control it and are the major sponsor and user. I don't think Google or MS or any other company heavily involved in crafting programming languages for their own purposes will ever go that route for some of their core software, because they can't control the language and if they tried they would get the blame for trying.
- steveklabnik 6y agoMozilla does not control Rust. Google and Microsoft are both already using Rust for real products.
- chinesempire 6y agoNot core. There will never be Rust in Chrome or in Office. Mozilla controls Rust because it's the largest Rust user. Just like Google controls Go, even though it's opensource. You said it yourself "the only real way to get a job working on Rust was to work at Mozilla"
- steveklabnik 6y ago> There will never be Rust in Chrome There is a branch in the repository right now trying it out. Rust is also used in ChromeOS. > Mozilla controls Rust because it's the largest Rust user. Mozilla is not the largest Rust user, nor does the largest user control the language. Governance is consensus-based, and anyone is eligible to join. > You said it yourself "the only real way to get a job working on Rust was to work at Mozilla" I may have said that a long, long time ago, but it's not true today. The Rust team at Mozilla has been shrinking, and other companies have been letting folks work on Rust as part of their job. And volunteers are like, 10x-25x more numerous than people who are paid to do so.
- steveklabnik 6y ago> At Firefox they already knew the problem they were trying to solve using Rust, they already wrote that software, already discovered many of the overlooked complications involved in writing a modern browser, so, in conclusion, even a rewrite in plain C would have solved many of the bugs. The Rust re-write was the third attempt; the first two were in C++ and failed.
- amlxy 6y agoNonsense, the first rewrite was famously as success (because anyone claimed it could not be done). Have you contributed any code?
- steveklabnik 6y agoHere is is straight from the devs: https://youtu.be/Y6SSTRr2mFU?t=360 https://youtu.be/Y6SSTRr2mFU?t=360
- lostjohnny 6y agoEverybody knows that the third time is the right one! I think the point stands even more, if they tried a rewrite before, they had gathered a lot of knowledge around rewriting a browser as well Joe Armstrong, creator of Erlang, explained that his process to writing software worked like this: - write it - re-write it - rewrite it again, but this time make it right Nobody can tell what could have happened if the third attempt was done in Pascal or Lisp or Lua I too agree that Firefox being the company behind Rust, and practically the only one writing large software with it, it's not the most unbiased source to ask if Rust is good or not In Italy we have a say "Non chiedere all'oste se il vino è buono" which literally translates to "don't bother asking the innkeeper if the wine is good" which probably in english is the equivalent of "Never ask a barber if you need a haircut."
- 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/