3 ms·
> If you're using Java or C++ or mainstream OOP, you're not getting the benefits out of static typing anyway What is it that about Java or C++ or OOP that you
by detrino 13y ago
> If you're using Java or C++ or mainstream OOP, you're not getting the benefits out of static typing anyway
What is it that about Java or C++ or OOP that you think makes their static typing useless?
> but those are going to call for a Hindley-Milner type system, not Java's weird mess of one.
Hindley-Milner is actually a poor type system. It trades away powerful features like overloading and subtyping in exchange for global type inference. Scala, like C++ and C#, does not use Hindley-Milner but a kind of local type inference.
- mightybyte 13y ago> What is it that about Java or C++ or OOP that you think makes their static typing useless? He's not saying their static typing is useless. He's saying it's not an accurate representation of the state-of-the-art in static type systems. > Hindley-Milner is actually a poor type system. It trades away powerful features like overloading and subtyping in exchange for global type inference. Something that you may think is a good idea in one context may not be such a good idea in another context. I'll take Haskell's type classes over subtyping any day.
- detrino 13y ago> He's not saying their static typing is useless. He's saying it's not an accurate representation of the state-of-the-art in static type systems. Perhaps he meant to say "full benefits" and it was only a typo. > I'll take Haskell's type classes over subtyping any day. Type classes and subtyping are not incompatible.
- mercurial 13y ago> Hindley-Milner is actually a poor type system. It trades away powerful features like overloading and subtyping in exchange for global type inference. Scala, like C++ and C#, does not use Hindley-Milner but a kind of local type inference. On the other hand, subtyping does add a large amount of complexity and is misused about 90% of the time.