cmpute / dashu

A library set of arbitrary precision numbers implemented in Rust.
Apache License 2.0
74 stars 9 forks source link

Consider returning Results instead of panicking #51

Closed Shoeboxam closed 6 months ago

Shoeboxam commented 6 months ago

Hi @cmpute, as always, great library. I just wanted to ask how you feel about returning results instead of panicking. I'm trying to use dashu in situations where overflow or underflow can easily be recovered from, and the way in which I'm using the library tends to seek out and find these edge cases. I've tried pre-emptively catching cases where dashu panics, but this is unreliable.

If you are interested in this API change, would you like me to open a PR with this change for you to review?

Thanks!

Shoeboxam commented 6 months ago

Closing, as it is duplicated with #29.