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
7
u/[deleted] Aug 25 '21
I disagree strongly. With a tiny bit of discipline that becomes automatic, you can completely prevent dangling pointers, every single time.
Again, you can almost mechanically prevent this from happening by following best practices. If you move back and forth between C and C++, this of course increases the risk, but if you write wrappers to deal with each API, you can guarantee such issues just won't happen.