Time to move std.experimental.checkedint to std.checkedint ?

jmh530 john.michael.hall at gmail.com
Sat Mar 27 21:02:39 UTC 2021


On Wednesday, 24 March 2021 at 20:28:39 UTC, tsbockman wrote:
> [snip]
> TLDR; What you're really asking for is impossible in D2. It 
> would require massive breaking changes to the language to 
> implement without undermining the guarantees that a checked 
> integer type exists to provide.

Are you familiar with how Zig handles overflow [1]? They error on 
overflow by default, but they have additional functions and 
operators to handle when you want to do wraparound.

Nevertheless, I agree that the ship has sailed for D2 on this.

[1] https://ziglang.org/documentation/master/#Integer-Overflow


More information about the Digitalmars-d mailing list