News for hackers. Stuff that matters.
Re:FOSDEM 2025: The state of Rust trying to catch up with Ad... by Joker_vD on Monday February 10, 2025 @08:47AM (#43000242)
The main use is not having to deal with INT_MIN, the two chief problems of which is that you a) you can't sensibly abs() it, b) most people tend to forget about point a). This problem in my experiences most commonly arises in naive implementations of itoa/etc. which tend to assume that they can just call abs() and concentrate on the positive half-range signed integers. Nope, you can't do this, not all negative integers have a positive counterpart.

There are no comments on this comment yet.