Glasgow haskell vs. Lispworks
- From: "Rene de Visser" <Rene_de_Visser@xxxxxxxxxxx>
- Date: Fri, 10 Aug 2007 21:09:01 +0200
Hello,
I have used Common Lisp for about 4 years, and was persuaded that it was the
best available programming language (well at least the one I liked the most;
somehow I never caught on to Smalltalk).
I read a posting (maybe even in this newgroup) from someone who had used
Common Lisp for a large number of years, and had learned haskell. His
description of the good features of Haskell persuaded me that it was worth
learning, at least to improve my Common Lisp skills.
After about 3 months of struggling to learn Haskell (I found Common Lisp
easy to learn), I finally started to get the hang of it.
After around 2 years of (Glasgow) Haskell I now prefer it as a language to
Common Lisp. Glasgow haskell is still improving.
However Lispworks is (IMHO) about 10 years ahead of GHC (Glasgow haskell
compiler) in functionality (e.g. the next release of GHC will for the first
time include a debugger.) so I still sometimes use Lispworks. Also there are
some very nice libraries in Common Lisp, alone one of which alone might take
several man years to port to Haskell.
-- What I prefer about Haskell.
Maintaining large programs is easier. You can obtain the type signature of
any function, and the type signature of a Haskell function pretty well
describes what a Haskell function does. From this I can also understand
better how function works, and how to change it. When I make changes, the
type checker shows me where I need to make further changes, and where I have
made a mistake. On the other hand a unit test only tells me that something
is wrong, but not where or why.
Libraries can often be understood from their interface.
Different libraries can be used together in combination. Too often Common
Lisp libraries have their own version of defun or other standard functions
that are not compatible with each other (and very hard to intergrate).
No ugly macro composition problems, or finding that I need to pass a macro
to a HOF as a parameter.
I find Haskell code prettier and easier to read (I find Common Lisp easy to
read as well, however not as good Haskell).
I find large Haskell programs of similar complexity (IMHO) easier to
understand than Common Lisp ones.
Haskell does "automatic state management" (an abuse of the term, but I find
that immutably, and functional purity does make it easier for me to reason
about programs). The next step after garbage collection, but as an C
programmer will tell you: garbage collection is evil, it restricts what the
programmer can do with manual memory management.
Equals works correctly in Haskell. Not need to decide between eq, eql,
equals, equalp and other data structure specific versions.
I have less choices in Haskell.For me this simplifies programming. Code
sometimes follows directly form the types.
Haskell's type system gives me the option of designing a program in terms of
its types. I find this a useful option.
-- What I prefer about Lispworks
Completely incremental development. No waiting for a file to compile.
Rebuild only once a week to make sure rebuilding from scratch still works.
Great integrated development enviroment. Lispworks is well stress tested
over the years. Problems are often known in advance. And you know others
have found solutions to them.
Good range of libraries available for common lisp.
Macros are easier in common lisp (I don't find template haskell as
friendly).
Embedding DSL's in common lisp is easier and often blends in better
(visually/syntactically).
Switching data structures in a running application is much easier in
Lispworks (note that this also possible in a GHC application, the libraries
our however not really there yet (generate marshalling functions from the
old to the new structures, and then dynamically import the new modules and
perform the marshalling)).
-- Why I can't add the features of Haskell to Common Lisp.
I don't have time to create the complete GHC system as a DSL in Common Lisp.
This is probably around 50 man years work.
All the Common Lisp libraries would still be in normal Common Lisp, so this
really wouldn't help anyway.
Summary.
Haskell and Common Lisp are both good languages.
Rene
.
- Follow-Ups:
- Re: Glasgow haskell vs. Lispworks
- From: David Golden
- Re: Glasgow haskell vs. Lispworks
- From: Rainer Joswig
- Re: Glasgow haskell vs. Lispworks
- Prev by Date: Re: How best to have incompatible but convertible types?
- Next by Date: Re: How best to have incompatible but convertible types?
- Previous by thread: How best to have incompatible but convertible types?
- Next by thread: Re: Glasgow haskell vs. Lispworks
- Index(es):
Relevant Pages
|