Reply to post: Good advice but

Carnegie-Mellon Uni emits 'don't be stupid' list for C++ developers

DrXym Silver badge

Good advice but

Some of the advice is borderline farcical, not because the advice is wrong but because the language allows those things to be written in the first place.

- Do not read uninitialized memory

- Do not access an object outside of its lifetime

- A lambda object must not outlive any of its reference captured objects

- Do not rely on the value of a moved-from object

- Use valid iterator ranges

- etc.

The list goes on and on.

It's no wonder that Rust is gaining such interest. I'd say a very substantial percentage of these issues, would be stopped in their tracks by the design of the Rust language / library and by the compiler's lifetime / borrow checks without sacrificing any performance.

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

Biting the hand that feeds IT © 1998–2019