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

Yes, thankfully at least with NULL they didn't fall into the legacy trap and messed up the standard with non-zero NULL that some machines before have been kind of using.

>Defining signed integer overflow to wrap, for example, is probably a bad idea

I wouldn't call it great behavior, but it's at least what most people expect will happen, and most people will be able to understand what's going on, and it's fast on most systems that matter. However, it's still undefined behavior. Just codifying overflows to be wrapping, would therefore be an improvement in my opinion, at least over what we have today.



I would say that most people expect it not to happen. If they really had to mandate a behavior, it should be to trap.




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

Search: