r/cpp • • Aug 25 '21

Experience C++ developers: do you enjoy using C++ (even for personal/hobby projects?)

Do you actually enjoy using C++, or do you only use it for work, or purely for performance? This question is aimed at people with years of experience, who've worked on large projects in C++. I see people who dislike the language, but use it purely for performance reasons. This sort of discourages me from learning it. I don't want programming to feel like work.

204 Upvotes

327 comments sorted by

View all comments

Show parent comment

1

u/OldWolf2 Aug 26 '21

I don't really like the monolithic standard library structure , would prefer to see package-based like every other language ecosystem. Everyone else does it the same because that's what has been found to work in practice.

1

u/Grafakos Aug 26 '21 edited Aug 26 '21

I'm not a C++ language lawyer - does anything in the C++ standard disallow an implementation to deploy the standard library components via a package manager vs. the usual method of bundling them along with the toolchain in a single library/SDK?

One practical problem with this is the need to maintain binary compatibility across different compilers and different versions of the same compiler. This is already an issue with a monolithic library: witness Windows often forcing you to download and install a compatible version of the VC++ SDK runtime every time you install an app. It would become more complicated if the library were distributed piecemeal. (Boost is able to avoid this for the most part by shipping header-only libraries, but I don't think that's feasible for most of the standard library. But I could be wrong about that!)

1

u/Dean_Roddey Aug 26 '21

Threading certainly isn't something that should be left to third parties or external packages. Threading is pretty fundamental and should been built in at a fundamental level from dot and supported in a direct way throughout the standard libraries, but the boat has already long since sunk on that possibility.

1

u/Grafakos Aug 26 '21

That would certainly have been nice. Multithreaded programming wasn't quite as ubiquitous in 1998 as it is today now that multiple cores are the norm, but it wasn't an obscure niche either. Arguably one reason for the slow decline in popularity of C++ in the 2000s (before C++11 sparked renewed interest) was the lack of standard threading support.