4 ms·
> For example, you can't just spin up an integer at will in Rust: you need to specify how many bits you're using, and manually sign or unsign each value to mani
by rcfox 5y ago
> For example, you can't just spin up an integer at will in Rust: you need to specify how many bits you're using, and manually sign or unsign each value to manipulate it accordingly.
let x = 5;
- smoldesu 5y agoI mean, you can do this, but it will still get automatically typed as a u8, which could very easily cause confusion for Python devs who really want to push that value past 255. My bigger point (and likely the authors) was that Rusts integers aren't like Java's ints or Python's bigints. Your laziness in that example is still being penalized, it's just harder to see and therefore, less "correct".
- tux3 5y agoFYI the default is i32, not u8.
- deleted 5y ago[deleted]