GoingDeep: C9 Lectures: Dr. Ralf Lämmel - Advanced Functional Programming - Type Classes

GoingDeep

Welcome to another series of C9 Lectures covering functional programming. For this series, Dr. Ralf Lämmel has generously taken the time to produce videos for Channel 9 from his office at the University of Koblenz-Landau (Germany), where he is a professor of computer science. The idea here is to

Running time
0h47m
File size
22.00MB

Download Original File | View original post

Episode synopsis

Welcome to another series of C9 Lectures covering functional programming. For this series, Dr. Ralf Lämmel has generously taken the time to produce videos for Channel 9 from his office at the University of Koblenz-Landau (Germany), where he is a professor of computer science. The idea here is to take the next step from Erik Meijer's fantastic introductory series on functional programming. Accordingly, Ralf's series will dive into more advanced areas of functional programming, again focusing on the Haskell language (the functional concepts discussed here, however, span beyond any one functional language).

In this second lecture in the series, Ralf digs into Type Classes, which are type system constructs that enable ad hoc polymorphism. Type classes amount to an intriguing element of the Haskell language, which is, for example, evident in their ability to solve the Expression Problem (make sure you watch Ralf's first lecture on this subject). Furthermore, type classes directly relate to the interface notion of mainstream OO programming, adding important expressiveness to C#/Java-like interfaces.

Type classes also take functional or declarative programming to a whole new level—one may define relations and functions pointwisely on types. That is, in the same way a regular function pattern matches on value structure, a type-level function sort of matches on type-definitional structure. This is quite a mouthful, I know.

There are various extensibility scenarios in the neighborhood of the Expression Problem that are interesting to consider from a design perspective, including several also addressable with type classes, and others that aren't. Look for the riddles (there are indeed several riddles in this lecture); many of them call for a discussion, rather than a straight solution. But beware—some of them are really difficult.

See Lecture 1 - The Expression Problem

You might also like...

Comments

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“C++ : Where friends have access to your private members.” - Gavin Russell Baker