News for hackers. Stuff that matters.
Re:Modern C++ for C Programmers (2018) by moth-fuzz on Friday July 23, 2021 @10:17PM (#27937867)
I feel like I'm in the minority in not finding C++ complicated. C++ has gotten significantly LESS complicated c++11 and onward, I'd say. Inheritance hierarchies with private/protected/friends and virtual methods lead to significantly more complex codebases than flat templates and judicious use of constructors and destructors to handle things' lifetimes. When you've got a nice templated API, writing the client code almost feels like writing in a scripting language.

I'd say the only really hard part is understanding move semantics, but even then that's not really necessary and the verbiage on the internet is way too academic in that regard when it's really simpler in practice than it is when explained.

Re:Modern C++ for C Programmers (2018) by pjmlp on Saturday July 24, 2021 @01:54AM (#27938809)
Just like other languages, C++ is not (that) complicated, if you happen to have full control of the code being written.

It is when you scale the team, or have a codebase that is being kept running since C++ exists, that the problems start.

However, to be fair and something that C++ haters tend to cleverly forget, trying to update a .NET Windows Forms application written in C# 2.0 into C# 10, Java 1.4 into Java 17 and so on, will face similar issues in complexity and language idioms.

Re:Modern C++ for C Programmers (2018) by munchbunny on Friday July 23, 2021 @11:00PM (#27938059)
If you have the luxury of making a clean break from old style C++, possibly. But, for example, in my case the only reason to touch C++ is precisely older stuff like native API’s. Because of that, I’m never writing purely modern C++. If I’m writing C++, it’s going to be a mixed bag of stuff with naked pointers, naked pointers to pointers, mallocs, and other fun stuff, meaning the subtle interactions between old and new features are always on my mind.
Re:Modern C++ for C Programmers (2018) by ljm on Friday July 23, 2021 @10:23PM (#27937888)
How much experience of C++ is required to understand that?
Re:Modern C++ for C Programmers (2018) by pjmlp on Saturday July 24, 2021 @01:55AM (#27938815)
I guess being around since the language exists.

Just like looking at C# 10, Java 17, Python 3.9,... and making sense where the features or standard library calls came from.