Re:C++ proposal: There are 8 bits in a byte
by WalterBright on Friday October 18, 2024 @10:25PM
(#41885180)
It was actually supposed to be `cent` and`ucent`, but we needed a library type to stand in for it at the moment.
Re:C++ proposal: There are 8 bits in a byte
by kazinator on Monday October 21, 2024 @02:07AM
(#41901115)
In C it will almost certainly be int128_t, when standardized. 128 bit support is currently a compiler extension (found in GCC, Clang and others).
A type that provides a 128 bit integer exactly should have 128 in its name.
That is not the argument at all.
The problem is only having types like that, and stipulating nonsense like that the primary "go to" integer type is int32.
Can you remember the name for a 128 bit integer in your preferred language off the top of your head? I can intuit it in Rust or Zig (and many others).
In D it's... oh... it's int128.
https://dlang.org/phobos/std_int128.html
https://github.com/dlang/phobos/blob/master/std/int128.d