3 ms·
There are lots of places where it can help, but to give one example consider the Java 8 Optional type. It’s great for avoiding nulls, but you get excessive nes
by pharmakom 5y ago
There are lots of places where it can help, but to give one example consider the Java 8 Optional type.
It’s great for avoiding nulls, but you get excessive nesting with many isPresent checks. Do notation can fix this.
The language even provides a bind function, but no reasonable way to use it!
- Skinney 5y agoExcessive nesting? Optional supports both .map and .flatMap.