This safe, "no worries" C++ was segfaulting. You've managed to make it correct today but it's still unsafe.
Someday one of your coworkers is going to break it and this code will be trashing the heap. Mysterious memory corruption failures are your destiny.
That said, Happy Halloween!
> Someday one of your coworkers is going to break it and this code will be trashing the heap. Mysterious memory corruption failures are your destiny.
You could have written something like, "It's possible this code will break in the future and you won't even realize the cause, because it will appear as a mysterious memory corruption failure."
See how I left out a word like "destiny" and took out the whole bit about coworkers? Yeah, much nicer and less personalized.
The point was that being a C++ programmer is like being part of a horror movie.
I say that as a person who uses C++ in my day job. It's a nightmare.
You obviously have interesting things to say and opinion to share with a fair amount of passion, but the tone detracts from the message, which I find a pity.
We're getting so soft and so fragile, how does it end?
“Hard times create strong men, strong men create good times, good times create weak men, and weak men create hard times." (G. Michael Hopf)