Integer literals in @rustlang can't be passed to functions that take floating point types. I've known this for a while, but are the reasons why written somewhere? Why was it necessary to make people write f(2.0) instead of just f(2)? Is there a reason against allowing this?
-
-
It’s not necessary, strictly speaking, but more of a policy and consistency thing.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
-
-
We already allow 2.0 as right hand side in assignment to both f64 and f32. Why not allow anything that can be losslessly converted to the right type? Like assigning 2 to an f32.
Thanks. Twitter will use this to make your timeline better. UndoUndo
-
Loading seems to be taking a while.
Twitter may be over capacity or experiencing a momentary hiccup. Try again or visit Twitter Status for more information.