Hacker News new | ask | show | jobs
by std_throwaway 2462 days ago
It does not change your existing integers or compilation time. Only where you use the new types the compiler will have more work to do. What would be the alternative in those places? Manual code? Preprocessor macros? Assertions everywhere? A theorem prover?

To me the implementation seems to be a good solution given that you don't want to change the core language.

1 comments

> What would be the alternative in those places?

Fix the damn language.

As in, adding more features to C++? And then people cry about how complex C++ is.
Stop worrying about 9-bit bytes, only logical shift right for signed integers, ones-complement and sign-bit integers, etc and define this stuff in the standard. PDP-11 was a long time ago. C++20 is heading in the right direction with defining twos-complement. The next good step would be declaring signed overflow as wrapping (eg -fwrapv)