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

Anything have to do with binary formats and I/O would qualify.

Let's say for example you're trying to load a binary file and the header format is like this:

16 bit magic number, 8 bit file size, 3 bit version, 5 bit header size

Now, are you confident enough in how structs are laid out in memory that you could use a bitfield to read these values in? Are you sure it would work on 32 bit, 64 bit, big and little endian machines? What is all that packed structure nonsense in GCC?

That's something that C abstracts away from you and can lead to errors.



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

Search: