Comment by pton_xd

6 months ago

Yeah as someone who writes C in C++, everytime I see posts bending over backwards trying to fit parameterized types into C I just cringe a little. I understand the appeal of sticking to pure C, but... why do that to yourself? Come on over, we've got lambdas, and operator overloading for those special circumstances... the water's fine!

So maybe you can answer the following question I have: what is a "protected abstract virtual base pure virtual private destructor," and when was the last time you needed one?" At least with C, I understand the feature set and how they interact.

  • Just because a feature is there doesn't mean you have to use it.

    Additionally the example isn't even possible, at least make ridiculous examples that compile.

  • This is just silly. C++ gives you a smorgasbord of multi-paradigm features. Everything has its place and you can mix and match your needed featureset based on project needs, team skillset etc. You don't have to know or learn everything.

Some people will do as much as they can to hurt themselves, only to avoid using C++.

Note as the newer versions are basically C++ without Classes kind of thing.

  • I think the main appeal is subset lock-down and compile times. ~5000 lines in C gets me sub second iteration times, while ~5000 lines in C++ hits the 10 second mark. Including both iostream and format in C++ gets any project up into the ~1.5 second mark which kills my iteration interests.

    Second to that I'd say the appeal is just watching something you've known for a long time grow slowly and steadily.

  • I see it the other way round. People hurt themselves by using C++. C++ fans will never understand it, but it you can solve your problem in a much simpler way, this is far better.

    • We won't, because C++ is Typescript for C.

      It offers us safety features for arrays and strings, that apparently WG14 will never add to C.

      Didn't so in 40 years, and still remains to be seen what will be done with the current trend of cybersecurity laws.

      Then there is the whole basic stuff like proper namespaces instead of the ridiculous prefix convention.

      This from a point of view of C++ ARM defacto standard back in the 1990's, not even considering anything else.

      I see more possibilities for people to hurt themselves using C than C++, since 1993 when I added C++ to my toolbox.

      7 replies →

    • IMHO C++ scales far better for large, self-contained, personal projects though it requires slightly more initial investment.

      And if you're targeting PC, you might be better off using Python to begin with (if perf is not a concern)

      3 replies →