Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Read my comment above: hardening is in, an effort to classify and remove UB is on the way. Implicit contracts (yes, that means basically to bounds-check even native arrays automatically) is on the way.

If you use warnings as errors they catch even subsets of dangling nowadays. Other ways of dangling have been made illegal (temporary conversions and range for lifetime extension).

I agree with you the defaults are still not the best but it is dteafily getting better.

But I think in the next years things are going to be tightened further in standard terms for better defaults. In fact, it is already happening.

The difficult part I think it is lifetimes.





All of that is great, and I strongly support these initiatives, but they are all teeny tiny bandaids.

Lifetimes are a crucial aspect of writing code in C++, yet they do not appear anywhere in the syntax. The same goes for synchronization. These problems are fundamentally unfixable without major, incompatible language changes.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: