archives

Max messages per page?

I don't know if it's just me or whether there was an upper limit put on the number of messages being cranked out per page? When I click on a response I get two problems: First, only 10 messages from the very top of the thread are displaying - albeit with a next page button at the bottom. Second, the link doesn't go to the message I click on unless it happens to be in one of the first 10.

Open data types and open functions

Open data types and open functions (pdf)
by Andres Löh and Ralf Hinze
Abstract: In object-oriented languages, it is easy to extend data by defining new classes, but it is difficult to add new functions. In functional languages, the situation is reversed: adding new functions poses no problems, but extending data (adding new data constructors) requires modifying existing code. The problem of supporting both directions of extensibility is known as the expression problem. We present open data types and open functions as a lightweight solution to the expression problem in the Haskell language. The idea is that constructors of open data types, and equations of open functions can appear scattered throughout a program. In particular, they may reside in different modules. The intended semantics is as follows: the program should behave as if the data types and functions were closed, defined in one place. The order of function equations is determined by best-fit pattern matching, where a specific pattern takes precedence over an unspecific one. We show that our solution is applicable to the expression problem, generic programming, and exceptions. We sketch two implementations. A simple one, derived from the semantics, and one based on mutually recursive modules that permits separate compilation.
This (draft) paper was mentioned at the Spring School on Datatype-Generic Programming (discussed previously on LtU) where it received considerable interest.