[Haskell] Re: [Haskell-cafe] Haskell versus Lisp
Wolfgang Jeltsch
wolfgang at jeltsch.net
Fri Sep 16 10:24:08 EDT 2005
Am Freitag, 16. September 2005 15:29 schrieb Glynn Clements:
> David Roundy wrote:
> > > Bearing this in mind, and hoping you can see where I'm coming from, I
> > > think my question is: shouldn't you guys be using Lisp?
> >
> > Lisp is impure, weakly typed and has way too many parentheses. Why would
> > we use lisp? It seems to be lacking almost all the advantages of Haskell,
> > and have an ugly, inflexible syntax to boot.
>
> The ability to dynamically generate, manipulate and analyse code in a
> structured manner provides a flexibility which is unmatched by any
> other language I know of.
>
> A good example is Emacs; lisp is entirely the right language for that,
> IMHO.
Could you explain this a bit more, please? To the moment, I cannot imagine
cases where you need LISP's way of code analysis and manipulation because
Haskell's capabilities are not sufficient.
In Haskell, code is data too because code in the sense of imperative actions
is described by IO values. You cannot analyse them. But you can use your do
expressions etc. to construct action descriptions with a more general type
like MonadIO m => m a. Then you can instantiate m with a monad whose values
store part of the action's structure so that this information can be used
later. Or you use a monad which doesn't keep structural information to use
it for later processing but which does the processing upon construction.
Best wishes,
Wolfgang
More information about the Haskell
mailing list