[Haskell-cafe] Comparison with Clean?
karczma at info.unicaen.fr
karczma at info.unicaen.fr
Wed May 4 16:22:11 EDT 2005
Bryce Bockman writes:
> If it is syntactical simplicity that you like you might want to learn
> Scheme as an introduction to FP. I'm no expert on either Scheme or
> Haskell, but we all have to agree it is an elegant language. I'm
> currently teaching myself the two in parallel, and I find that scheme is
> sort of the C of FP, in the sense that it doesn't try to be too fancy in
> what it gives you. No fancy type system there, but you can build just
> about anything with it.
I would rather not compare Scheme to "C".
C is a fixed-syntax language, the "lack of fanciness" is *rigidity*.
Scheme is infinitely extensible, don't say that its *syntax* is simple
just because you have its "Cambridge-Polish" notation, parenthesed/prefixed.
Just look at the syntax of DO, of classes, units, etc. in DrScheme, just
try to imagine the power of a *general* macro-expander, very far from cpp...
> Scheme is strict, so it lacks some of the flexibility (and drawbacks) that
> come from Laziness, but in the book they teach you how to build a Lazy
> version of Scheme, which is instructive in understanding what's really
> going on in Lazy evaluation.
Don't confuse categories please. SICP doesn't say how to make a lazy variant
of Scheme. Applicative protocol is not normal protocol, the reduction is,
as it is. On the other hand, it is relatively easy to make lazy constructs,
streams based on explicit, user-controllable thunks, since you can of
course construct dynamically functional objects.
This does not necessarily tell you what is the *real* implementation of
laziness in Haskell, and even less in Clean; "manual thunks" are possibly
different from a specific graph reduction strategy implemented by a lazy
language compiler. You will learn something anyway, but perhaps something
different.
Jerzy Karczmarczuk
More information about the Haskell-Cafe
mailing list