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

It gives a consistent layout in memory, meaning you can save/load very simply. Using a struct puts you at the mercy of the compiler's struct packing and alignment settings.

The other stuff is more stylistic but I'd guess he writes a lot of assembly code, and the enum style translates easily to asm.




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

Search: