by Timwi · 1y ago · 0 comments
However, there are two barriers to me building it myself and submitting PRs. The first is that it's not officially supported to build or run on Windows, so I'd have to get familiar with WSL first or set up a dual-boot environment.
The second is that it's written in the obsolete and unusable language of C++. I would have loved an opportunity here to get into Rust or something, but C++ has proven itself hazardous to my mental health, so I'm staying away from it.
Now, with that out of the way. Andreas has been very clear about the reasons why C++ is the chosen language. He has years of experience with it along with writing browsers.
Im paraphrasing here, but he has said that the web evolved around the era of OOP and C++ is the OOP language of that era. Including statements on how C++ fits nicely with the OOP styles of web specs.
I am not a Rust evangelist. I've never written any code in it and barely know its features on a theoretical level.
I have also not dissed on anyone's decision to use C++. Everyone please use what you like and are comfortable with! I am not imposing any choice on anyone. I simply described my own personal experience with C++ and my own reasons for staying away from it.
As for C++, Ladybird uses very modern C++ that makes it substantially easier to write reasonably safe code than the C++ of yore.
Still, as much as I would like to see the world move to safer languages, C++ is everywhere. Every major browser is written in it. It's not "unusable" in the slightest (though I certainly understand not wanting to learn C++ as an outsider at this point in time, it's a quite boring language in comparison and the C++ job market probably won't let you make use of modern language features that might make it interesting).
I would love to live in a world where projects with security risks like web browsers would "just" use Rust instead of C++ but you'll have to convince the people building the browser to spend their own time or their bosses' time to learn Rust first, and that's a tough sell.
There's Servo if you want to contribute to an open source browser in Rust. It looks like it can certainly use the help it you compare its development speed with Ladybird.
Oh come on. There's nicer ways to say "I'm not good at it". It's OK you know, you can't be good at everything. Just don't make it other people's fault.
Millions of people have built meaningful software with C++ over the past several decades. It is everywhere and it mostly works OK.
Of course, C++ is not necessarily the best choice for everything or anything. But it is a mostly reasonable choice for lots of things in 2025, just like it was in 1995.
If thousands of HN readers suddenly decide that they need to start their 10+ years learning of C++ with immediate contribution to the Ladybird project it would be not really helpful, right?
By using a very simple technique, I've managed to write 0 bugs in it in the past 15 years.
And I’d disagree with both.