Are protocols type classes?

There's definitely some overlap with Swift's protocols and Haskell's type classes. Are they exactly the same? Probably not. If not, what is something that Haskell type classes can do that Swift protocols can't? Or vice versa?

Maybe this is not a "Using Swift" topic. I ask because I'd like to better understand the advanced features of programming languages.

Terms of Service

Privacy Policy

Cookie Policy