Difference between revisions of "WG211/M6RalfLaemmel"
From WG 2.11
(Created page with "Category:WG211 <h2>The Expression Lemma</h2> <h3>Ralf Lämmel, joint work with Ondrej Rypacek</h3> Algebraic data types and catamorphisms (folds) play a central role ...") |
m (1 revision) |
(No difference)
|
Latest revision as of 11:06, 12 December 2011
The Expression Lemma
Ralf Lämmel, joint work with Ondrej Rypacek
Algebraic data types and catamorphisms (folds) play a central role in functional programming as they allow programmers to define recursive data structures and operations on them uniformly by structural recursion. Likewise, in object-oriented (OO) programming, recursive hierarchies of object types with virtual methods play a central role for the same reason. There is a semantical correspondence between these two situations which we reveal and formalize categorically. To this end, we assume a coalgebraic model of OO programming with functional objects. The development may be helpful in deriving refactorings that turn sufficiently disciplined functional programs into OO programs of a designated shape and vice versa.