3 ms·
I use Optional quite a lot, but only ever as a poor man's x?.let{f(it.y)} via Optional.ofNullable(x).map(it->f(it.y)).orElse(null); Will it at least g
by usrusr 2y ago
I use Optional quite a lot, but only ever as a poor man's
x?.let{f(it.y)}
via
Optional.ofNullable(x).map(it->f(it.y)).orElse(null);
Will it at least get taken care of by escape analysis?
These days I'd not even trade the simple but effective approach taken by Kotlin for the full glory of Scala's Option (which is so far beyond the Java Optional).