3 ms·
Local variable type inference was brought to Java with the version 10.
by hocuspocus 8y ago
Local variable type inference was brought to Java with the version 10.
- mcv 8y agoOoh, nice. That sinks that part of my argument, I guess. Still, it doesn't change the fact that some type systems are cumbersome in some places, yet valuable in other places. I think we're currently seeing a movement towards type systems that do more for you while getting in the way less, and that's certainly useful.
- hocuspocus 8y agoI think most modern(ized) languages have reached a fairly good compromise. Full inference is typically infeasible or too expensive unless you stick to the ML family and Haskell. And even then, I believe you want explicit type signatures for self-documenting purposes, also to avoid unwanted generalization.
- mcv 8y agoExactly. Explicit function signatures are very valuable. Having the system check that the object you get fits your expectations is useful. There are other situations where I could do without them.