[Haskell-cafe] Interesting Thread on OO Usefulness (scala mailing
wagner.andrew at gmail.com
Mon May 4 07:46:06 EDT 2009
This sounds like a really interesting question. To save some people weeding
through the thread and Jon Harrop's usual trolling garbage, here's a
description of the problem:
Here's [a]language to to interpret (where postfix * means tupling):
Integer literals: i
t = Lambda x*. t
| Apply t t*
We assume usual operational semantics of lambda calculus (i.e. static
The task is to write two interpreters, one with variables x being
DeBruijn indices and one with them being names.
You should go for maximal sharing, i.e. factor out commonalities into
a common class/typeclass/functor/whatever, so that there remains no
duplication of code in the two solutions.
On Mon, May 4, 2009 at 6:05 AM, Paolo Losi <paolo.losi at gmail.com> wrote:
> Hi all,
> I'm following an interesting thread on the scala mailing list:
> Martin Odersky advocates the OO features of the scala language
> proposing an interesting problem where the OO approach seams
> I would be very much interested in seeing an Haskell solution
> to that problem. Any haskell guru want to take a stub at it
> or give an opinion from a pure FP point of view?
> Haskell-Cafe mailing list
> Haskell-Cafe at haskell.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe