4 ms·
It seems like the author actually likes Java's Optional pattern but needs some syntactic sugar to make the medicine go down. Because int id = args.getOpti
by Spivak 8y ago
It seems like the author actually likes Java's Optional pattern but needs some syntactic sugar to make the medicine go down.
Because
int id = args.getOptional().orElseThrow(() -> new Error("id expected"));
isn't that different than the author's Kotlin example.