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

No, this is not true. Until C++ can reason carefully about aliasing, it can't be memory-safe. Iterator invalidation and reference invalidation are the key problems here.

Rather than repeat the code examples in detail, I'll link to some earlier examples I've shown:

http://news.ycombinator.com/item?id=4724781

http://news.ycombinator.com/item?id=4724421

Basically, they come down to references and iterators not knowing about aliasing, thus being unable to determine when the referent is destroyed.



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

Search: