|
|
|
|
|
by usrusr
691 days 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). |
|