Hacker News new | past | comments | ask | show | jobs | submit login

I think it also helps that modern hardware is a lot less diverse. Most of the tools only run on systems that are little endian, where NULL is zero, chars are 8 bits, ints are two’s complement and silently wrap around, floats are 32 bits IEEE 754, etc, so code that erroneously assumes those to be true in theory isn’t portable, but in practice is.

And newer C standards code may even unbreak such code. Ints already are two’s complement in the latest version of C++ and will be in the next version of C, for example.




> code that erroneously assumes those to be true in theory isn’t portable, but in practice is.

Be careful about undefined behaviour still. Even if your architecture have defined semantic, the compiler might still not assume them.




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

Search: