4 ms·
I generally agree, but I think the real strength in types come from the way in which they act as documentation and help you refactor. If you see a well laid out
by zeroCalories 1y ago
I generally agree, but I think the real strength in types come from the way in which they act as documentation and help you refactor. If you see a well laid out data model in types you supercharge your ability to understand a complex codebase. Issues like the one in the example should have been caught by a unit test.
- sam_lowry_ 1y agoAlso validation. In Java, you can have almost seamless validation on instantiation of your very objects. That's why having a class for IBAN instead of String containing IBAN is the right way to do.
- codr7 1y agoAllocating objects for every single property can turn pretty bad in Java. A strong enough type system would be a lot more useful.