News for hackers. Stuff that matters.
Re:The case against a C alternative by bregma on Tuesday August 09, 2022 @07:36AM (#32396498)
This is not my experience. Most developers are just not very good at what they do, and the go-to smart pointers for not-very-good C++ developers is std:shared_ptr<T>.
Re:The case against a C alternative by saidinesh5 on Tuesday August 09, 2022 @09:24AM (#32397489)
This has been my experience as well - especially when C++11 came out. I have seen codebases where it has been "use std::shared_ptr for everything, becuase it is safer if/when we use threads". I know that doesn't make sense, but it just was the attitude back then.

Tbh, Back then, I didn't see a problem with it. Once i started chasing down weird bugs where objects aren't freed properly because no one knew which objects own what, I have been very cautious.

Re:The case against a C alternative by bluGill on Tuesday August 09, 2022 @09:50AM (#32397855)
We had a few developers like that here when C++11 was introduced, but a few people gave them the smack down and now we rarely see shared pointers.
Re:The case against a C alternative by mort96 on Tuesday August 09, 2022 @07:50AM (#32396602)
Hmm, that might be. Most of the C++ I've seen has been in LLVM, Google projects, projects where I'm the only developer or projects where I laid the groundwork which other people build upon, so I'm probably not mainly looking at the kind of code bases you're talking about.
Re:The case against a C alternative by lupire on Tuesday August 09, 2022 @07:57AM (#32396646)
OK but those people aren't going to magically write safe performant C either.