Adam Szlachta

Haskell and Functional Programming enthusiast.

Adam is an enthusiast of Haskell and functional programming. He professionally works with Java, Pyhton, C# and C++. That's not all as he is also a philosopher, musician, traveller and most of all experimentator digging into the world of Category theory.

Many people think of Haskell as the most beautiful programming language, because of the simplicity of the core language, conciseness of the Haskell code, theoretical foundations, and other reasons.

Haskell is well known to be a number one purely functional language. This means that you can't do things in an imperative style: changing values of variables, mixing side effects with calculations, interrupting the program flow by breaks or exceptions. Functions have to be referentially transparent, they will yield the same results for the same set of arguments. This is not a recommended style, it's the only possible one. And it makes it much easier to reason about program behaviour, to prove correctness, and to write concurrent applications.

There are some techniques however, which make it possible to write an imperative looking code, without violating purity of the language. They require zero to little syntactic sugar, sometimes just a humble "do" keyword. They are based on constructs borrowed from a branch of mathematics named category theory. We can call them functional programming patterns, but they are something more: they have laws you have to obey if you want to implement one. They are powerful and expressive, and you can achieve much more than just mimicking imperative languages. I will show a couple of them with examples of usages.

Video ←Back