Comment by lynndotpy
I got into this with Genuary in 2023 or 2024. I found myself wishing Rust had a flag that would automatically coerce between different integer and float types. Just let me put an i32 where you're expected a u64, an f32 where you want an i64, it'll be okay, I swear!
Will it be okay though? i32 to u64 has two ways to convert it:
This matters with negative numbers, where the first one pads with 32 bits of 0, the second one pads it with 32 bits of 1. Sometimes (as it once happened to me), you wanted the wrong one.