3 ms·
Dealing with null and undefined cases is a significant practical advantage of a modern type-system. Compilers can catch most of them. Also you can encode your
by sa1 10y ago
Dealing with null and undefined cases is a significant practical advantage of a modern type-system. Compilers can catch most of them.
Also you can encode your logic in types - The Curry-Howard Correspondence (https://en.wikipedia.org/wiki/Curry–Howard_correspondence https://en.wikipedia.org/wiki/Curry–Howard_correspondence) says this is always possible in sufficiently advanced type-systems. While this goal hasn't been realized in mainstream programming languages, we have been moving towards it for a long time.
So when you say that you only have logical errors, not type errors and can't recall any type issues, do keep in mind that those are exactly the kind of things type-systems aim to solve.
But I can't blame you since Java and similar languages provide the only mainstream experience of static types.