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

>The main driver behind the evolution of the C Standard is not to break existing code written in C, because the world largely runs on C programs.

If not deprecate, then at least make fixed width types as equivalent members to them, ie all char based apis should accept s8 (typedef signed char s8) and all int based apis should accept s32.



Well, there are number of problems with this proposal. For example, if your implementation defines int as a 16-bit type (which is permitted for by the standard) and you pass an int32_t, the value you pass maybe truncated if it is outside of the range of the narrower type. When programming, it is best to match the type of the API of the function you are calling for portability.




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

Search: