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
When encountering a null value for Safeable often you just want to map that to one of the existing enum values and one can do that in the accessing code with Elvis operator and perhaps some added parentheses, but it would seem to me that it would improve readability if Safeable had a method like:
fun valueOrElse(defaultValue: T) = value ?: defaultValue
The text was updated successfully, but these errors were encountered:
When encountering a null value for Safeable often you just want to map that to one of the existing enum values and one can do that in the accessing code with Elvis operator and perhaps some added parentheses, but it would seem to me that it would improve readability if Safeable had a method like:
The text was updated successfully, but these errors were encountered: