Q: What does "Sparse is better than dense" mean? (Python Zen)
Tim Peters
tim.one at comcast.net
Fri Jul 12 23:05:03 EDT 2002
[Ian Bicking]
> Tim hasn't chimed in yet -- I bet he's letting us make our own wild
> speculations, so that we may attain greater wisdom through pondering :)
Me too. Recall that I merely channel Guido, and even then correctly only on
good days. When I channeled "sparse is better than dense" as one of Guido's
fundamental design principles, I was as mystified as anyone else. Indeed,
my first thought was "what the hell is that supposed to mean?!". But, as a
professional channeler, I was duty-bound to pass it on as it was revealed,
neither adding nor removing jot nor tittle.
In the years since, I've come to see that it has many meanings, some of
which I explained yesterday. I'm learning from other thoughtful posts (such
as yours) that I still have a long way to go in mining its full depth. Or
in realizing its full shallowness, depending on how you view it <wink>.
> Or maybe his attention is just elsewhere... but I'd like to think that
> this is a Zen koan.
Oh no. Koans are far more advanced, in the nature of using a stick to stir
up a fire that consumes the stick in its quest to illuminate its own nature.
The channeled 20 Pythonic Theses (their original name -- "The Zen of Python"
was tacked on by somebody else, whom I suspect was not really a Zen master)
are more about using sticks to build a strong platform, as if sticks were
real and strong platforms were worthy of building. It takes a stronger
channeler than me to dismiss that as illusion. The end of Pythonic
Enlightenment is pleasure in achieving fine code; it's not enough to get you
Nirvana, presumably because it's still full of sticks <wink>.
> Unlike most of the other people in this thread, I always thought of
> sparse v. dense as a syntactic/semantic issue.
That's definitely part of it. The openness of Python's visual appearance,
the ubiquitous use of dicts, and the carefully chosen handful of control
structures were the first things I thought of.
> ...
> I'm probably reading more into this little statement than is there.
I don't believe that's possible. Try harder <wink>.
More information about the Python-list
mailing list