5 ms·
You mean Mozilla, the organization that has maintained a 6 million LOC[1] C++ codebase continuously for nearly 20 years? If they can't pull it off with C++, I
by forgetfulness 6y ago
You mean Mozilla, the organization that has maintained a 6 million LOC[1] C++ codebase continuously for nearly 20 years?
If they can't pull it off with C++, I don't care who can, C++ is not the right tool for the job and you can file writing such a thing in it as an esoteric programming challenge, together with template Tetris.
1. https://www.openhub.net/p/firefox/analyses/latest/languages_summary https://www.openhub.net/p/firefox/analyses/latest/languages_...
- skohan 6y agoWhat language is the CSS engine used by Chrome or Safari written in?
- eitland 6y agoTwo points: - how does the performance of those fare against Stylo? - the developer of Chrome is so insanely rich that only a tiny tiny fraction of their budgets in practice finance all of Firefox. Summary: Mozilla manages to make an equally good or better CSS engine with a lower budget? (I admit Google might be running the Chrome team on a shoestring but my bet is they don't as coming in a position were they can kill ad blocking really would be a fantastic strategic advantage for them and would be worth billions a year.)
- skohan 6y agoSaying Rust allowed Mozilla to achieve a better result for less money is a much softer claim than saying C++ is an unsuitable language choice for this problem, which is what I was responding to. The second is the claim I would dispute. The former may be true.
- ygjb 6y agoYou are absolutely welcome to dispute it, but the fact of the matter is that an engineering team with the expertise, history and resources to write at least two iterations of a CSS processor did their homework and chose to rewrite it in Rust, realizing significant performance gains across a smaller code-base. The advantage to that team being Mozilla is that alot of the discussions that lead to these implementations are captured in meeting documents, bugzilla tickets, other places, like this blog post explaining why and how they got the gains they did: https://hacks.mozilla.org/2017/08/inside-a-super-fast-css-engine-quantum-css-aka-stylo/ https://hacks.mozilla.org/2017/08/inside-a-super-fast-css-en... If you want to dispute the claims, do the research, otherwise it's just your opinion against the actual implementation that is shipping to millions of devices.
- skohan 6y agoThe fact that Mozilla used Rust for Stylo is not evidence that C++ is not usable to solve this problem.
- forgetfulness 6y agoIf you give a C++ programmer infinite tape they will be able to write this program in finite time, is that all you're saying?
- skohan 6y agoNo, I am saying there is nothing intrinsic to the problem of a CSS engine that makes it intractable in C++. C++ is the most used language for highly parallel, HPC applications. I don't see why there is anything magical about CSS which would prevent a c++ solution from also existing here. I'm not arguing that Rust was not the best choice here for Mozilla. I personally would also rather work with Rust than C++ in almost all cases. But to claim that C++ is not usable to solve this problem, based on the fact that Mozilla decided to use Rust instead is not a sound argument.
- forgetfulness 6y agoYes, but that reads like a put down for Mozilla. That hypothetically a team of guys earning like half a million a year in a big hedge fund could be recruited to build precisely a parallel CSS engine if they work in it for a year or two is not a good argument for using C++ for this either.
- skohan 6y agoIt's not a put-down to Mozilla at all. I'm sure they chose Rust for very good reasons, and they achieved a great result. I'm not even arguing that C++ should be used for this. I'm just saying it's absurd to claim that C++ could not be used for this if you really wanted to.
- Narishma 6y agoIs it a parallel CSS engine like Stylo?