Hacker News new | ask | show | jobs
by jerf 5567 days ago
What you're seeing there is the distinction between "manifest typing" [1] and "implicit typing" [2]. With manifest typing, you actually have to tell the compiler the specific type. With implicit, it will figure it out, either because (as discussed in the article) everything is the same type "Object", or because it will do type inference. Most modern type inference has started with Hindley-Milner [3], but move beyond it in various ways with varying degrees of justification and success. Raw HM doesn't seem to be enough to work with in practice, but moving beyond it gets you into the realm of undecidability unpleasantly quickly. But some progress is being made.

The C(/#/++)/Java languages had a lot of people convinced that being statically typed required manifest typing. Including me. I thought I was against static typing, what I was against was manifest typing.

[1]: http://en.wikipedia.org/wiki/Manifest_typing

[2]: http://en.wikipedia.org/wiki/Type_inference

[3]: http://en.wikipedia.org/wiki/Type_inference#Hindley.E2.80.93...