Why don't people like lisp?

Marcin 'Qrczak' Kowalczyk qrczak at knm.org.pl
Sun Oct 19 12:03:24 EDT 2003


On Sun, 19 Oct 2003 17:22:17 +0200, Luke Gorrie wrote:

> C'mon guys, live a little,
> 
>   (defun mostn (fn list)
>     (let ((max (apply #'max (mapcar fn list))))
>       (values (remove max list :test-not #'= :key fn) max)))

I can write it shorter that way in Python and in my language too, and it's
not even equivalent because it applies fn twice for each element, so my
point stands.

Yours would be a valid point if Lisp provided a significantly different
paradigm. But it was about the syntax of function calls, local variables,
loops, conditionals, variables etc. which are about as common in Lisp as
in those languages.

def mostn(fn, list):
   Max = max(map(fn, list))
   return [x for x in list if fn(x) == Max], Max

def mostn Fn List {
   let Max = map List Fn->maximum;
   select List ?X {Fn X == Max}, Max
};

-- 
   __("<         Marcin Kowalczyk
   \__/       qrczak at knm.org.pl
    ^^     http://qrnik.knm.org.pl/~qrczak/





More information about the Python-list mailing list