Reply to post:

Rust never sleeps: C++-alike language tops Stack Overflow survey for fourth year in a row

DrXym

Actually the majority of my problems originate from using C++ as the language that allow them to be problems in the first place and the mess of code I have to write to make those problems go away.

If I were to write a RAII wrapper in another language, Rust for example, I wouldn't remotely have as many issues as this. The struct would move on assign so no copy constructor issues. There is no inheritance so no virtual destructors and I could ensure the object couldn't live beyond the scope of the thing that owns it with lifetimes.

POST COMMENT House rules

Not a member of The Register? Create a new account here.

  • Enter your comment

  • Add an icon

Anonymous cowards cannot choose their icon