You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Current as defined in the Architecture and Design document, we return Optional to allow returning none and failing quietly. There are numerous sections where this creates convoluted and not clear code. This needs to be revisited and discussed.
One such issue is the use of int_to_q_unchecked and similar functions. These are used frequently and push the issue around of when to return None due to a failure. These would be much clearer with a throw of an Error with a message.
One possible solution is that all global stateless functional methods do not return Optional and stateful classes always return Optional. This would allow for throwing errors at those levels.
The text was updated successfully, but these errors were encountered:
The unchecked versions should only be used if you're absolutely certain that there will be no out-of-bounds arguments. Otherwise, use the regular "checked" versions.
I really want to avoid throwing anything. It makes the code much harder to test and debug.
Current as defined in the Architecture and Design document, we return Optional to allow returning none and failing quietly. There are numerous sections where this creates convoluted and not clear code. This needs to be revisited and discussed.
One such issue is the use of
int_to_q_unchecked
and similar functions. These are used frequently and push the issue around of when to return None due to a failure. These would be much clearer with a throw of an Error with a message.One possible solution is that all global stateless functional methods do not return Optional and stateful classes always return Optional. This would allow for throwing errors at those levels.
The text was updated successfully, but these errors were encountered: