Python syntax in Lisp and Scheme

prunesquallor at comcast.net prunesquallor at comcast.net
Tue Oct 14 03:23:47 EDT 2003


Raffael Cavallaro <raffaelcavallaro at junk.mail.me.not.mac.com> writes:

> In article <pan.2003.10.13.11.11.45.541879 at knm.org.pl>,
>  Marcin 'Qrczak' Kowalczyk <qrczak at knm.org.pl> wrote:
>
>> Note that Lisp and Scheme have a quite unpleasant anonymous function
>> syntax, which induces a stronger tension to macros than in e.g. Ruby or
>> Haskell.
>
> Actually, I think that any anonymous function syntax is undesirable. I 
> think code is inerently more readable when functions are named, 
> preferably in a descriptive fashion.

So it'd be even *more* readable if every subexpression were named as
well.  Just write your code in A-normal form.

> I think it is the mark of functional cleverness that people's code is 
> filled with anonymous functions. These show you how the code is doing 
> what it does, not what it is doing.

I disagree.  This:

  (map 'list (lambda (x) (+ x offset)) some-list)

is clearer than this:

  (flet ((add-offset (x) (+ x offset)))
    (map 'list #'add-offset some-list))






More information about the Python-list mailing list