[Haskell-cafe] Haskell vs Scheme

Greg Meredith lgreg.meredith at biosimilarity.com
Tue Apr 1 17:08:38 EDT 2008


Excellent questions you posed to Simon P-J -- who then forwarded them to the
Haskell Cafe list. By way of answering i should say i was a Schemer from the
get-go; it was really the first programming language i studied as an
undergraduate majoring in maths at Oberlin in the early 80's. Eventually, i
went on to design and build my own language (at MCC with Christine
Tomlinson, the principal investigator) called Rosette. While Scheme was
Sussman and Abelson's way of making sense of Hewitt's ideas in a sequential
setting Rosette was our way of doing the full banana -- including the
actor-based form of concurrency as well as both structural and 3-Lisp-style
procedural reflection and a whole host of other advanced features. So, i was
naturally profoundly frustrated when the world at large turned to languages
like C, C++ and even Java. i have been waiting more than 20 years for the
industry to catch up to the joys of advanced language design.

Now that the industry has taken a shine to functional languages again i have
been spending more time with the various modern flavors and have to say that
while each of the major contenders (ML, OCaml, Erlang, Scala, Haskell) have
something to be said for them, Haskell stands out among them. Haskell enjoys
a particular form of mental hygiene that few other languages enjoy. Its
syntax, by comparison with Scheme, is remarkably concise -- and, the
importance of syntax is almost impossible to gauge because at the end of the
day it is code one is staring at ;-). The chief semantic differences that
make a difference to my mind may be classified as follows.

   - types
   - monads
   - meta-programming

In order, then: at its outset Haskell made a strong commitment to a potent
(static) typing scheme. Even if types can be layered on Scheme, the two
language design vectors are remarkably different and give programming a
different feel. As a result of my academic and professional training i have
come to rely heavily on types as a development discipline. In fact, if i
cannot devise a sensible type "algebra" for a given (application) domain
then i feel i don't really have a good understanding of the domain. One way
of seeing this from the Schemer point if view is that the deep sensibility
embodied in the Sussman and Abelson book of designing a DSL to solve a
problem is further refined by types. Types express an essential part of the
grammar of that language. In Haskell the close connection between typing and
features like pattern-matching are also part of getting a certain kind of
coherence between data and control. Again, this can be seen as taking the
coherence between data and control -- already much more evident in Scheme
than say C or C++ or even Java -- up a notch.

Haskell's language-level and library support for monads are really what set
this language apart. i feel pretty confident when i voice my opinion that
the most important contribution to computing (and science) that functional
programming has made in the last 15 years has been to work out practical
presentations of the efficacy of the notion of monad. As a Schemer i'm sure
you understand the critical importance of composition and compositional
design. The monad provides an important next step in our understanding of
composition effectively by making the notion parametric along certain
dimensions. This allows a programmer to capture very general container
patterns and control patterns (as well as other phenomena) with a very
concise abstraction. Again, this could be layered onto Scheme, but Haskell
embraced monad as a central abstraction at the language design level and
this leads to very different approaches to programming.

Now, the place where Haskell and the other statically typed functional
languages have some catching up to do is meta-programming. Scheme, Lisp and
other languages deriving from the McCarthy branch of the investigation of
lambda-calculus-based programming languages enjoy a much longer and deeper
investigation of meta-programming constructs. While MetaOCaml stands out as
a notable exception i think it safe to say that 3-Lisp and Brown are pretty
strong evidence of the long history and much richer investigation of
meta-programming notions along the McCarthy branch than along the Milner
branch. The industry as a whole, i think, has embraced the value of
meta-programming -- witness (structural) reflection in such mainstream
languages as Java and C#. And the Milner branch family of languages are
moving rapidly to catch up -- see the efforts on generic programming like S
P-J's SYB or TemplateHaskell -- but the deep coherence evident in the
simplicity of the monadic abstraction has not met up with the deep coherence
of 3-Lisp, yet.

Anyway, that's my two cents... but i note that US currency is not worth what
it used to be.

Best wishes,


Message: 21
Date: Tue, 1 Apr 2008 11:18:25 +0100
From: Simon Peyton-Jones <simonpj at microsoft.com>
Subject: [Haskell-cafe] FW: Haskell
To: Haskell Cafe <haskell-cafe at haskell.org>
Cc: "kerrangster at gmail.com" <kerrangster at gmail.com>
638ABD0A29C8884A91BC5FB5C349B1C32AB9FA8B7B at EA-EXMSG-C334.europe.corp.microsoft.com

Content-Type: text/plain; charset="us-ascii"

Dear Haskell Cafe members

Here's an open-ended question about Haskell vs Scheme.  Don't forget to cc
Douglas in your replies; he may not be on this list (yet)!


-----Original Message-----
From: D. Gregor [mailto:kerrangster at gmail.com]
Sent: 30 March 2008 07:58
To: Simon Peyton-Jones
Subject: Haskell


In your most humble opinion, what's the difference between Haskell and
Scheme?  What does Haskell achieve that Scheme does not?  Is the choice less
to do with the language, and more to do with the compiler?  Haskell is a
pure functional programming language; whereas Scheme is a functional
language, does the word "pure" set Haskell that much apart from Scheme?  I
enjoy Haskell.  I enjoy reading your papers on parallelism using Haskell.
How can one answer the question--why choose Haskell over Scheme?



L.G. Meredith
Managing Partner
Biosimilarity LLC
806 55th St NE
Seattle, WA 98105

+1 206.650.3740

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20080401/7186747c/attachment.htm

More information about the Haskell-Cafe mailing list