News for hackers. Stuff that matters.
Re:Ladybird browser to start using Swift language this fall by stephc_int13 on Saturday August 10, 2024 @09:58AM (#41209555)
Well, there are indeed many ways to shoot yourself with C++, this is why having C++ experts on the team is a good thing. They are supposed to know how to avoid the traps and avoid being lured into the worst parts of C++ and OOP design style.

I have seen very good C++ projects using only the minimal amount of bullshit features, Omar Cornut's Dear Imgui comes to mind as an example.

As Swift beginners, they are less likely to avoid the bad idioms, but this is the kind of thing you only discover late, when the codebase is large enough.

Re:Ladybird browser to start using Swift language this fall by gjsman-1000 on Saturday August 10, 2024 @10:02AM (#41209593)
Perhaps, but here’s a question:

Can you really tell me, that any C++ codebase doesn’t have memory safety bugs?

The last decades have shown that almost every C++ codebase has a bug somewhere, as long as you look hard enough. That’s not a good state of affairs.

C++ is a reactionary language. The programmer assumes they are an expert who can use it safely, there’s just a few exceptions or mistakes here and there and that’s normal.

Using memory safe languages is a programmer knowing they will mistakes, that they aren’t that smart despite their best efforts, and mitigating the opportunity.

Avoid near occasions of sin.