Skip to content

Comment on A Special Kind of Hell: intmax_t in C and C++ (2020)

Comments

I think C# did it right in 2000. Regardless of CPU architecture, integer types like short, int, or ulong have fixed size of 16, 32 and 64 bits respectively.

There're couple special types with machine-dependent size, like IntPtr, but these only used for opaque handles and C interop.

This is something it inherited from Java and is standard in newer languages like Rust and Go too

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.