Re:JEP 286: Local-Variable Type Inference
by plesner on Saturday March 12, 2016 @01:51AM
(#11271662)
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.
[ Parent
| on HN ]
Re:JEP 286: Local-Variable Type Inference
by wvenable on Saturday March 12, 2016 @08:58PM
(#11275769)
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.