3 ms·
In D, we use `int` for 32 bits, `long` for 64 bits, and `size_t` for a pointer index. All the craziness just melts away. You can port the code back and forth be
by WalterBright 3y ago
In D, we use `int` for 32 bits, `long` for 64 bits, and `size_t` for a pointer index. All the craziness just melts away. You can port the code back and forth between 32 and 64 bit patterns, and it just works. All those `int32_t` types are out back in the bin along with the whiteout.
- volemo 3y agoI like Rust’s choice for basic types: initial and the number of bits: u8, i32, f64, etc. (I’m not comparing the languages in any way here, just praising a clean notation.)
- WalterBright 3y agoI suspect the impetus for suffixing the number of bits is a bit of a backlash from C, where you never know how many bits are in a type. That has caused C programmers a lot of trouble and extra work.