Posts

Showing posts with the label TypeClasses

The power of Scala Type Classes

Image
Scala language it was very inspired by Haskell . Type classes in another sample of this and many inspirations  from Haskell. There are always several ways and styles of thinking to address problems. Type classes is another way of thinking and dealing with problems. For some problems, you might just use Pattern Matcher -- But if you have to add a type? Right, I could stick with good old OO since Scala is hybrid right? --  But what if you need to add one operator? Type Classes can help you out.