Thursday 7 May 2015

Object Algebras Resources

Object algebras is a really cool solution to the expression problem. We have recently used them as a device for implementing extensible stream pipelines (described in the previous post, Streams à la carte).

A good place that someone can start from, to understand object algebras, is the definition of the Expression Problem. The de-facto reference for that is Philip Wadler's 1998 e-mail:

"The expression problem is a new name for an old problem. The goal is to define a datatype by cases, where one can add new cases to the datatype and new functions over the datatype, without recompiling existing code, and while retaining static type safety (e.g., no casts)".

After that, the reader should be able to answer the question: What does the Visitor pattern allow and what does it prevent?. Afterwards, one should read the original paper by Bruno C. d. S. Oliveira and William R. Cook and become familiarize with the idea, via the solutions to the expression problem in various languages. Pick one that you like the most and explore the structure! If the reader is more functional-oriented, a good place to start is from Tagless Interpreters.

In the following, I give some links that provide ample information on object algebras. Let me know if you found a resource useful on the internet and I am going to update the post here for future reference.
 

Bloggers/Discussions/Videos

Papers

    No comments:

    Post a Comment