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
{{ message }}
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.
As discussed in #242 it would be good to follow the following approach to improve the way we use Option and Try types and reduce/remove the use of unsafe methods as .get if possible.
Approach
If we expect a method parameter not to be optional, then we should try not to use an Option/Try as parameter type. This would lead to the client to handle the lack of necessary information before calling the method.
If a method should receive this kind of optional values and depends on them to be successful (Some/Success) and can't provide a value of type A to handle failure cases, then one should return to the client an Option[A]/Try[A] instead of A. It should then be the client the one to either again solve the issue or forward the returned Option/Try.
Other approaches are welcome to this discussion.
The text was updated successfully, but these errors were encountered:
As discussed in #242 it would be good to follow the following approach to improve the way we use
Option
andTry
types and reduce/remove the use of unsafe methods as.get
if possible.Approach
Other approaches are welcome to this discussion.
The text was updated successfully, but these errors were encountered: