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

I can think in at least one reason. Having let's say `int` as long as the register size would get you portable efficiency since it doesn't matter if the underlying processor is 8, 16 , 32 or 64 bit, you always will have a type that fix just right.

There are some other types (i.e int32_t, int64_t, etc) that you could use if you want to be sure that your variable would have the same size regardless of the architecture.



For that, there's now intN_fast_t in stdint.h - the fastest data type that's at least N bits.




Consider applying for YC's Fall 2026 batch! Applications are open till July 27.

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

Search: