Six programming paradigms that will change how you think about coding (2014)

Six programming paradigms that will change how you think about coding (2014)

For example, imagine you wrote three lines of code, A, B, and C:

In most programming languages, A would execute first, then B, and then C. Idris, on the other hand, makes types a first class member of the programming language, so the dependent type system seems much more powerful and clean. For example, the code for a simple sudoku solver in prolog just lists out what each row, column, and diagonal of a solved sudoku puzzle should look like:

Here is how you would run the sudoku solver above:

The downside, unfortunately, is that declarative programming languages can easily hit performance bottlenecks.

Source: www.ybrikman.com