r/ProgrammerHumor • • Oct 27 '26

Meme sameProblemSameSolution

Post image
1.5k Upvotes

79 comments sorted by

View all comments

-12

u/mas-mas-itu Oct 27 '26

During 2012-2016, I was so excited and ambitious to learn and use C++ profesionally. Later on when its' standardization becoming more and more ridiculous, it does more damage to me rather on making things easier.

18

u/Anxious_Marsupial_59 Oct 27 '26 edited Oct 27 '26

C++ 20 (and the following streamlining of C++ 23) was a monumental upgrade in making it easier to use and avoiding foot guns without having to always write your own standard library, what are you even talking about?

33

u/Kinexity Oct 27 '26

when its' standardization becoming more and more ridiculous

Literally all that was added over the years following C++11 are optional features. No one holds a gun to your head forcing you to use them.

-23

u/helanhalvan Oct 27 '26

If those optional features where implementing sensible things, sure. For example, can you, using the standard library, print vector<vector<int>> to stdout easily? As far as I can tell, no, you need to write loops or recursion yourself.

16

u/tim_pipperton Oct 27 '26

Is that really such a pressing issue? Regardless, reflection makes that way easier on the library side.

23

u/Kinexity Oct 27 '26

Almost like as if there is no one single correct way to print out such structure. If you always want to print it out the same way then no one stops you from writing your own mini library to do it in your every project. Go back to Python if you want the language to hold your hand and decide stuff for you.

5

u/QuaternionsRoll Oct 27 '26

Eh, debug printing is definitely an overlooked feature in C++. It’s possible that reflection will improve things somewhat, but hard to say

1

u/palapapa0201 Oct 27 '26

I believe std::format can already do that?

1

u/helanhalvan Oct 28 '26

This is why I find it so frustrating. Yes, std::format is the exact kind of construct you would expect to solve this problem. However it does not work with any collection out of the box.

We tried to make it work but ended up making a recursive templated function instead. Now, I guess everyone can make their own recursive templating function, but then why do we even gave std::format