3 ms·
The thing with scope functions is, you are doing nothing if it is null, returning default (even magic..) value or throwing an unchecked exception, even though y
by tommyage 7y ago
The thing with scope functions is, you are doing nothing if it is null, returning default (even magic..) value or throwing an unchecked exception, even though you want to force your colleague to handle his failure accordingly
- distances 7y agoYou can always do something else for the null case, but this totally depends on the context. Hard to say anything generic. Throwing an error is always an option too if the value is expected.