Why don't people like lisp?
prunesquallor at comcast.net
prunesquallor at comcast.net
Sat Oct 18 19:42:53 EDT 2003
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.
More information about the Python-list
mailing list