3 ms·
If you are stuck with Java, you will not want to offload that kind of checking into the static types system. Instead, you have object constructors. Use them.
by marcosdumay 2y ago
If you are stuck with Java, you will not want to offload that kind of checking into the static types system.
Instead, you have object constructors. Use them.
They will dump all kinds of `if (result.is_valid)` variants over your code. But well, this is Java. It's not a different kind of shit from `if (result != null)`, and it's something you have to live with.