What does "Sparse is better than dense" mean? (Python Zen)
Miki Tebeka
tebeka at cs.bgu.ac.il
Sun Jul 14 03:11:25 EDT 2002
Tim Peters <tim.one at comcast.net> wrote in message news:<mailman.1026462409.20961.python-list at python.org>...
> The value of an aphorism is in provoking you to ponder. So long as you
> suspect there's something of value in it that you don't yet understand, it's
> doing its job. As soon as someone thinks they understand it, and then just
> repeats it (whether to endorse or ridicule doesn't much matter) in lieu of
> contemplation, its usefulness is exhausted.
I agree. However I wanted some other opinions. I got more than I've imagined.
> I suspect that's why God always
> arranges to get himself killed whenever he takes on human form <wink>.
Or maybe it's the only way back up :-)
> I've read that if you confine too many rats in too small a living space,
> they become sociopathic. That's density for you. I've seen no reason to
> suspect that code, concepts, data structures, interfaces, programmers or
> managers have an advantage over rats in this respect. Give yourself some
> room to breathe and stretch: couple interfaces loosely, let a subsystem
> deal with a little rather than a lot, leave a little whitespace for flowers
> to grow between tokens, fail soft on feathers instead of hard on rocks,
> don't do two things at a time until you're pretty sure you can do one, a
> function with 14 arguments-- or a module with 14 classes --is a bad idea,
> don't fall for the idea that between any two abstractions you always need to
> compromise on a third. Etc.
>
> In other words, sparse is better than dense. Except when it comes to chip
> design, where sparseness plain sucks <wink>.
>
> pythons-swallow-rats-one-at-a-time-ly y'rs - tim
I prefer something else on my plate.
Thanks.
Miki
More information about the Python-list
mailing list