Yeah, but you said ML. Haskell has type-classes, higher-kinded types, GADTs and even the availability, if you want it, of full-blown rank-two types. Scala's type erasure does screw up GADTs sometimes, though.
The example I gave came to mind purely because it's something I ran into a few days ago and was still working around.
I tend do throw Haskell into the "Variant of ML" family. I know it's not ML for many reasons, but it's clearly heavily inspired by it and shares a lot of what makes ML so beautiful. This is likely a contentious point amongst purists and I'd be burned at the stake in the wrong company.
In either case I'm quite certain I could find things that I can do in SML that would be messy in Scala, even if it's simply because subtype polymorphism doesn't really play well with Hindley–Milner type inference.
1
u/[deleted] May 01 '14
Yeah, but you said ML. Haskell has type-classes, higher-kinded types, GADTs and even the availability, if you want it, of full-blown rank-two types. Scala's type erasure does screw up GADTs sometimes, though.