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
Having an empty ScoredValue doesn't make sense as it cannot be persisted nor it makes sense to construct it by a user as the scored value is always associated with a score. Instead, an empty ScoredValue should just return an empty value.
In that scope, we should revisit the nullable factory methods of GeoValue, whether a nullable GeoValue.fromNullable should be introduced with a return type of Value<V> to indicate it can be either a present GeoValue<V> or an absent Value<V>.
The text was updated successfully, but these errors were encountered:
mp911de
changed the title
Deprecate nullable ScoredValue factory methods
Let nullable ScoredValue factory methods return Value<V> instead of ScoredValue<V>
Mar 5, 2021
GeoValue provides now from and fromNullable methods returning Value. Empty values should not be associated with coordinates.
Value now exposes isEmpty() and ifHasValueOrElse(…) methods to improve functional programming arrangements.
…coredValue<V> #1644
Nullable ScoredValue factory methods now declare Value as return type as an empty value cannot be associated without a score. Either both pieces of information should be present or absent but partial existence doesn't fit the programming model.
Having an empty
ScoredValue
doesn't make sense as it cannot be persisted nor it makes sense to construct it by a user as the scored value is always associated with a score. Instead, an emptyScoredValue
should just return an empty value.In that scope, we should revisit the nullable factory methods of
GeoValue
, whether a nullableGeoValue.fromNullable
should be introduced with a return type ofValue<V>
to indicate it can be either a presentGeoValue<V>
or an absentValue<V>
.The text was updated successfully, but these errors were encountered: