Hacker News new | past | comments | ask | show | jobs | submit login

Haskell's typeclasses (which are almost identical to traits) support polymorphic nominal subclassing just fine.

Haskell actually has whole program type inference (unlike Scala, which only does local inference), so fold/map will always return the right type as well, but you also get to not have to put types anywhere if you don't want to (including function signatures).

Scala's main advantage over Haskell is being able to call into Java.




> Scala's main advantage over Haskell is being able to call into Java.

+ a superior module system + better type classes (no global namespace)

But yes, if running on the JVM is no option, Haskell is a serious contender




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: