Replies: 2 comments 1 reply
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Our current API providing a heavy usage of the Result type and extension functions for creating types, we want to improve the design by providing constructors,
orNullandorThrowfactory methods on companion object instead. Here's the guidelines for choosing between one of them:orThrowfactory method on companion object.nullin case of invalid inputs -> use anorNullfactory method on companion object.Here's an example of creating a
PositiveInt:Finally, due to the non-explicit support of nullable types in Java, the
orNullfactory methods should be only accessible on Kotlin.Beta Was this translation helpful? Give feedback.
All reactions