News for hackers. Stuff that matters.
Re:Swift is like Kotlin by Filligree on Thursday May 18, 2017 @11:00AM (#14367776)
> Type classes: https://kotlinlang.org/docs/reference/sealed-classes.html

Those are not type-classes, at least not in the Haskell sense. They allow you to avoid an else branch, yes, which is actually quite useful; but one basic ability they're missing is the ability to define a new branch for a new instance of the type defined by library users.

Just as an example. They're really not much like type-classes at all.

There are no comments on this comment yet.