[Haskell-cafe] Re: Interesting critique of OCaml

Chad Scherrer chad.scherrer at gmail.com
Thu May 8 13:34:01 EDT 2008

Don Stewart <dons <at> galois.com> writes:
[interesting quote...]
> Which I think really captures the joy of being able to write algebraic
> and data structure transformations, via rewrite rules, without having to
> extend the compiler -- all thanks to purity, laziness, and static
> typing.

This makes me wonder... Rewrite rules are certainly effective, and seem to be a
good place to point (one of many, of course) when asked why you'd want a 
language with Haskell's characteristics. It seems like there should be an
argument to this effect:

1. You'd like be able to declare compile-time transformations like
  map f . map g = map (f . g)
without messing with the compiler

2. For x in [purity, laziness, static typing, higher-order functions]
  If you don't have x, here's what goes wrong (or can go wrong)

3. Of the very few languages with these characteristics, Haskell is the most
widely-used, and the most actively developed and researched.

Now, I don't know much about lisp, but aren't code transformations like this the
whole point of macros? What makes is difficult to do the same thing in this 

What about object-oriented languages? The problem with step 1 in the argument is
that it's already cast in a functional-programming framework. Is there a way to
recast it so OOP could play?


PS - the link now gives a "500 server error" - did our traffic overwhelm it? Is
the cafe the next slashdot? ;)

More information about the Haskell-Cafe mailing list