C++ Logo

std-proposals

Advanced search

Re: [std-proposals] Floating idea for reserve overload

From: Jan Schultke <janschultke_at_[hidden]>
Date: Thu, 16 Apr 2026 10:27:39 +0200
>
> On Thu, 16 Apr 2026, 05:20 Jan Schultke via Std-Proposals, <
> std-proposals_at_[hidden]> wrote:
>
>>
>> tl; dr unsigned integers suck, but the train for fixing the problem has
>> left the station
>>
>
> This is a very silly statement. Unsigned integers do not suck, they are
> extremely valuable and important. When used appropriately. When you want
> modular arithmetic, or a collection of bits, you want to use unsigned
> integers.
>
> But when you want an integer that should not be negative, the useful
> properties of unsigned integer types are not appropriate.
>
> It doesn't help anybody to make sweeping over-general statements that they
> "suck".
>

Yeah, the tl; dr is poorly phrased. To be clear, they are useful, and I use
them all the time for things like bit manipulation and multiprecision; they
just suck when used for the purpose of expressing
preconditions/postconditions on functions because the negative consequences
from doing so outweigh the benefits.

Received on 2026-04-16 08:27:55