Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.


Also 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.


Allocating objects for every single property can turn pretty bad in Java.

A strong enough type system would be a lot more useful.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: