20 November 2018 / Adam Gajek

OOP vs. FP. The pursuit of extensibility part #2


In my previous blog post, I introduced the definition of the Expression Problem by Philip Wadler, along with two implementations of its solution. One of them is based on subtyping polymorphism (the so-called OOP solution); the other, which is implemented via functions with pattern matching, merits the title of a Functional Programming solution. We’ve seen […]

Read more

9 July 2018 / Adam Gajek

OOP vs. FP. The pursuit of extensibility part #1

, , , ,


    “Over the last few years I’ve been interested in the Scala programming language and I’ve heard a lot of criticism about its mixed Functional and Object-Oriented Programming nature. On the other hand, Functional Programming has recently become so popular that OOP is now considered an old-fashioned method that should be translated to FP […]

Read more

19 February 2018 / Adam Gajek

5 steps of creating your very first Type Class in Scala

,


In this blog post you will learn about how to implement your first type class, which is fundamental language feature in the icon of the functional programming languages — Haskell. Type Class is a pattern that originates from Haskell and it is its standard way of implementing polymorphism. This type of polymorphism is called ad-hoc polymorphism. Its […]

Read more