6 ms·
Firefox has tons and tons of C++ to this day.
by TedDoesntTalk 4y ago
Firefox has tons and tons of C++ to this day.
- monooso 4y agoBut would they choose C++ if they were _starting_ today?
- tzekid 4y agoI do mostly Python on my dayjob, but for low-level side-projects I've gotta say C++ with the C++17 or C++20 standard it's way faster to iterate with than say Rust or even something like Zig. For me iteration speed's a big selling point that (plus the fact that's easier to find contributors) might also be important for projects like these.
- chrismorgan 4y agoI’m puzzled by your comment. I am expert in Rust for almost a decade, but only mildly conversant in C++, and have no interest in actively learning more C++. Rust seems to me far easier to learn and get going in due in major part to its incontrovertibly superior standard tooling. I can’t see any place for any meaningful difference in iteration speed between the two, save that you may well have to iterate more in C++ due to memory safety bugs the compiler doesn’t catch. As for finding contributors, I get the impression that Rust is considerably more accessible, and thus will increasingly find contributors more easily, as people that just love programming will actively choose to learn Rust far more often than C++. (For the current state of affairs, I think it’ll depend on what sort of contributor you’re looking for, in skill, industry, paidness, &c. Some segments will certainly go one way, and others certainly the other.)
- cxr 4y agoIteration speed with both Rust and C++ is abysmal. Builds take for fucking ever on large projects and it's just slightly less bad for small-to-medium and medium-sized projects. With Rust, though, it's as if someone looked at C++ compilation times (not to mention resource requirements) and said, "I think we can find a way to make it worse."
- actionfromafar 4y agoCrystal says "hold me beer" :-D But I still really like Crystal.
- ClawsOnPaws 4y agoI have a hard time deciding where in this thread to drop this link, but maybe here is a good spot. Andreas has a video about this topic, and I believe it's this one: https://www.youtube.com/watch?v=vAZvTFoSIFU https://www.youtube.com/watch?v=vAZvTFoSIFU
- Koffiepoeder 4y agoPublished on April 1st 2022 ;-)
- ClawsOnPaws 4y agoyeah, it's probably the wrong video. Sorry. :( I know it's there though. This question came up and I know there was an answer for it.
- pjmlp 4y agoNote that SerenityOS started in 2018, they decided to use C++ for it, and even the newly created language for safer userspace (Jakt) generates C++ as target. So maybe, Jakt will get used as well.
- rob74 4y agoYes, but they are replacing it bit by bit - I mean, they even started Rust for exactly that purpose. So (without being a huge fan of Rust) the decision to start a "greenfield" browser project in a memory-unsafe language is questionable IMHO...
- suby 4y agoIt's not clear to me that they are replacing it bit-by-bit. https://4e6.github.io/firefox-lang-stats/ https://4e6.github.io/firefox-lang-stats/ I don't have an over-time series, but if you're willing to take my memory at its word Rust's percentage has hovered at around 10% for a while now. It seems to have actually gone down recently. Combine that with efforts like Servo being wound down and their team being let go, and it makes me wonder what the future of Rust looks like in Firefox. If anyone can shed some light on this I'd be interesting to know.
- tomashubelbauer 4y agoThis chart looks like it could use some filtering for what constitutes a language used to build Firefox. It seems questionable that HTML is used to build 16 % of it. I suspect that is a result of test cases being included in the chart as it is based off of the whole repo. I checked out the repository and it doesn't have the GitHub language bar I see on other repos, so I can't click the HTML bit in it to filter down the HTML files in the repo and see if they are mostly tests or not, but it is hard to imagine they would be anything else. Maybe bits of the browser Chrome but still, that wouldn't be a whole 16 % I think.
- nashashmi 4y agoI think they stopped the rebuild. They were previously building a new browser engine called servo. Some of that work made it through to Firefox gecko. And then team was gutted.
- pjmlp 4y agoI think it was more like "they were" up to the point the Rust team got layed off.
- 4y ago