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
Currently functions only support the NotNull type.
Most functions in neo4j have the property f(null) = null and are null otherwise.
For this reason I think it makes sense to change most of the functions to have two signatures (probably implemented as an object with two 'invoke' functions)
These would be:
(A) -> B
(A?) -> B?
An example would be adding two longs, the function signatures would be:
operator fun LongReturn.plus(other: LongReturn): LongReturn // Current
operator fun Nullable<Long, LongReturn>.plus(other: LongReturn): Nullable<Long, LongReturn>
operator fun LongReturn.plus(other: Nullable<Long, LongReturn>): Nullable<Long, LongReturn>
operator fun Nullable<Long, LongReturn>.plus(other: Nullable<Long, LongReturn>): Nullable<Long, LongReturn>
I think this would both let the user take advantage of null safety when not using null types as well has not slowing people down by haivng to handle null types
The text was updated successfully, but these errors were encountered:
Currently functions only support the NotNull type.
Most functions in neo4j have the property f(null) = null and are null otherwise.
For this reason I think it makes sense to change most of the functions to have two signatures (probably implemented as an object with two 'invoke' functions)
These would be:
(A) -> B
(A?) -> B?
An example would be adding two longs, the function signatures would be:
operator fun LongReturn.plus(other: LongReturn): LongReturn // Current
operator fun Nullable<Long, LongReturn>.plus(other: LongReturn): Nullable<Long, LongReturn>
operator fun LongReturn.plus(other: Nullable<Long, LongReturn>): Nullable<Long, LongReturn>
operator fun Nullable<Long, LongReturn>.plus(other: Nullable<Long, LongReturn>): Nullable<Long, LongReturn>
I think this would both let the user take advantage of null safety when not using null types as well has not slowing people down by haivng to handle null types
The text was updated successfully, but these errors were encountered: