Why don't people like lisp?
Rainer Joswig
joswig at lispmachine.de
Sat Oct 18 20:10:16 EDT 2003
In article <d6cu5czr.fsf at comcast.net>, prunesquallor at comcast.net wrote:
> mike420 at ziplip.com writes:
>
> > On the other hand, Joe Marshall and
> > someone else touted writing Lisp code that has 25+ nesting levels. Others
> > approved such practice. I think 25+ depth is much worse than 300+ length.
>
> Depth 25 isn't really that bad. Consider a simple LET expression:
>
> (let ((x (+ a b)))
> ...)
>
> That + is four levels deep in parens. There's a few similar sort of
> constructs that end up being somewhat deep. For example, look for an
> item in a collection by it's nickname, if it has one:
>
> (cond ((find item collection
> :key (lambda (thing)
> (or (thing-nickname thing)
> (thing-name thing)))) ...)
> (....))
>
> THING-NICKNAME is 6 levels deep. Wrap something like that in a
> handler-case, and you'll be up in the 20+ parenthesis in no time.
>
> The 25+ thing I found was an unusual coincidence of several of these
> `parenthesis-rich' constructs together. It was `logically' much
> shallower.
>
Why should be an indention depth of, say, 25 should be worse than, say,
20? Indention depth is seldom a problem at all. I really
don't care - it just needs to be indented in a way I can
read it on a screen. It is just another 'made up' problem
of Lisp.
More information about the Python-list
mailing list