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?
-
-
Replying to @Sunjay03
Same reason we don’t auto cast numbers. If you want a float, you should use a float.
2 replies 1 retweet 24 likes
It’s not necessary, strictly speaking, but more of a policy and consistency thing.
11:02 AM - 6 Jan 2018
0 replies
0 retweets
6 likes
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.