24 ms·
> (even in Java/Scala, all method-dispatching is done at runtime, as you're dispatching based on the implicit parameter). Uh ... invokestatic? > For example,
by smcj 15y ago
> (even in Java/Scala, all method-dispatching is done at runtime, as you're dispatching based on the implicit parameter).
Uh ... invokestatic?
> For example, Scala cannot implement the Hindley–Milner algorithm for type-inference, being forever forced to the current poor implementation that only deals with inferring the type of local variables.
The reason is that Scala has a much more powerful type system, than one that can be inferenced completely by HM (The HM type system was kept simple for exactly that reason).
Actually, the Scala language specification leaves out type inference for a reason: It is improved with every release to inference more and more useful things.
I'm getting slowly annoyed by those people thinking that a HM type system is "the best thing ever". Yes, it is simple, and simple is good.
But look at what Scala's type system can do as a comparison.
Please, get some idea what you are talking about before trolling about it.