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

I think in practice this would be pretty rare. At least coming from a C# background it doesn't seem to be an issue I've ever encountered.


It's possible that it's more a theoretical than a practical problem, I would hope so. But it does seem to me like fundamentally a problematic property of a type system that having more accurate types can break your program. It's the static type equivalent of breaking the Liskov substitution principle.


If a library author makes such a fundamental change their public API by making a method return more specific, I might actually want to know about it. I don't find it particularly problematic since it seems like code smell for that sort of change to happen in the first place.




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

Search: