-
Notifications
You must be signed in to change notification settings - Fork 41
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ensure usage from correct logic will never panic: use Result
where appropriate, otherwise document correct usage
#13
Comments
Implementing |
On further consideration, I'm not sure that a blanket "use Result everywhere" policy is actually beneficial. The potential overflow in I think a more useful goal would be something like:
|
Yeah, you're right, that seems like a reasonable plan. |
Result
everywhere a calculation can overflow or underflowResult
where appropriate, otherwise document correct usage
This will make it possible to guarantee panic-free codepaths.
Optionally, we might expose ways to record, read, that can panic but do not require the
Result
syntactic overhead.The text was updated successfully, but these errors were encountered: