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

There are people on the standard committee looking at safety, and some effort to see if more safety can/should be added to the standard library. Perfect safety is probably impossible, but there are several options being discussed. (operator[] is undefined if the value is out of range, but there is thought that perhaps checking range isn't that expensive and so we should throw an exception - it is possible that in many cases the compiler can prove the value is in range and thus the range check would be optimized out anyway). Safety profiles can also disable unsafe operations, and since they are opt-in (opt-out would be better but break too much existing C++) you choose when to pay the price. (if you have any other idea I'm interested)


Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: