I'm kinda intrigued why the std library in @rustlang doesn't return results for adding numbers together rather than panicking at overflow.
You should use Wrapping! It’s only slightly longer and you’ll always get the semantics you want
-
-
Of course, but that requires opening the standard library documentation to figure out what the exact right function call is again. Not a good idea in time trials. :)
-
That’s true, but if you learn it once, you don’t need to look it up every time :)
- 2 more replies
New conversation -
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.