Year: 2012

[DRAFT] Say your name ! ; Say “your name”! Do you understand the difference between those two sentences? The first uses the meaning of the words “your name”, while the other refers the words themselves. How do you know that? They are quoted. Sometimes you would like to be able to do the same…

Monads are one of the most complex concept to apprehend I encountered while learning functional programming, and unfortunately, like many developers I probably use them without understanding all the possibilities they offer. Before talking about what are Monads, it is interesting to understand where they come from. Monads come from Math, and are used…

The .NET Framework helps developer boost their productivity by giving them a set of tools and libraries they need to quickly start implementing the core of their software without loosing time on details. The idea behind the Common Language Infrastructure (CLI) is to allow programming languages to interoperate by sharing code through libraries. To…

I remember the day I got the mind shift about functional programming. I switched from being a fervent defender of Java and C# to a passionate of LISP dialects. At the time I was convinced that there were nothing better than OOP and curly bracket syntaxes. I was then fighting for conventions and simplicity…

Typing system The functional core of F# is statically typed, which means all checks concerning typing are done during compile time. Both Statically typed and dynamically typed system have pros and cons. Dynamic typing allows flexibility while static typing allows safeness and speed. Then a lot of programming languages try to get the…

One of the most interesting article I read about programming languages has been published by the author of Chibi, a small scheme implementation (http://synthcode.com/blog/2009/06/Small_is_Beautiful). The latter tries to defend the idea that beauty and power of programming languages is achieved through simplicity. While people understand that hiding complexity behind abstractions is a fundamental concept…

Pattern matching is a way of writing conditional code by mainly decomposing data into subcomponents. It is a high level construct allowing programmers to think naturally about their algorithms rather than in programming terms. Under the hood pattern matching expressions just are empowered if/switch expressions, so don’t worry to use them, they are efficient….

Lists are the most important data structures in functional programming languages. It is not for nothing that the first functional programming language, that is by the way the second oldest programming language (1958) is called LISP which stands for “LISt Processing languages”. LISP is all about working with lists to the point that even…

Most imperative programmers who start learning functional programming are lost because they don’t see loop constructs in code. Indeed even if some functional languages such as F# provide looping constructs they rarely or sometimes never use them. Why? Because actually they are not necessary, we can get ride of them thanks to a powerful…