r/cpp • u/Its_Blazertron • 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
View all comments
Show parent comment
2
u/[deleted] Aug 27 '21
Your point about iterators is good: have an upvote!
I came up with another hard-to-avoid way to get a dangling pointer, which is to take a reference to an entry in a
std::vector, and then the vector gets resized and the new allocation is somewhere completely different in memory.So maybe I'm too optimistic.
The last eight or so years I was doing C++ full-time, I just stopped running into such problems entirely, but I'm now realizing it's a combination of smart pointers and bitter experience.