4 ms·
It should be avoided, but there are legitimate use-cases. Deserialization, for example, might yield a few different types. Especially if you don't control the
by jdmichal 7y ago
It should be avoided, but there are legitimate use-cases. Deserialization, for example, might yield a few different types. Especially if you don't control the endpoint and the data back is a mess.
When it is used, it's very nice to have help from the language. I much prefer that to some kind of purist, "they shouldn't do that so we won't help". I certainly miss having type guards when I work in Java.