[Haskell-cafe] Re: Doing some things right

Achim Schneider barsoap at web.de
Fri Dec 28 16:06:00 EST 2007


Andrew Coppin <andrewcoppin at btinternet.com> wrote:

> Brian Sniffen wrote:
> > On Dec 28, 2007 6:05 AM, Andrew Coppin
> > <andrewcoppin at btinternet.com> wrote: 
> >> [I actually heard a number of people tell me that learning LISP
> >> would change my life forever because LISP has something called
> >> "macros". I tried to learn it, and disliked it greatly. It's too
> >> messy. And what the heck is "cdr" ment to mean anyway? To me, LISP
> >> doesn't even seem all that different from normal languages (modulo
> >> weird syntax). Now Haskell... that's FUN!]
> >>     
> >
> > Contents of Data Register.
> >   
> 
> Right. I've heard the story about why it came to be called that, but 
> seriously... I can never remember whether I want cdr or car. It's a 
> silly choice of name. [Sure, you can rename it. And then nobody but
> you will understand it.]
> 
That's not even the end of the fun: You can freely switch around car
and cdr, treating cdr as "element of head" and car as "tail", and try
to put into words why that won't make a foldl out of a foldr. You can
also never put any useful value into any cons and still have it
represent something useful, or say caaaddaaadaddaddadadadaddar, at
which point you're hopefully lost. It's probably called dadaism.

Actually, if you read through the Wizard Book, at least half of the
defined functions are defined solely in terms of list, car, cdar,
cddar and so on.

One might be tempted to claim that any sufficiently complicated scheme
program  contains an informally-specified, bug-ridden implementation of
half of haskell's type system.



More information about the Haskell-Cafe mailing list