3 ms·
Oh yeah, I wrote one of those, too, complete with safe navigation through type aligned sequences etc. https://github.com/cosee/null4j https://github.com/cosee/n
by RedNifre 4y ago
Oh yeah, I wrote one of those, too, complete with safe navigation through type aligned sequences etc. https://github.com/cosee/null4j https://github.com/cosee/null4j
If I were still writing Java I would throw in some exception throw/catching based Haskell style do notation for binding nullables, i.e.
var nullableResult = nullable(() -> {
var a = bind(getNullableA());
var b = bind(getNullableB());
doSomethingRequiringBothNotBeingNull(a,b);
});
In my experience, Java developers don't want null safety though (the ones that do switched to Kotlin anyway).