boring the reader to death (wasRe: Lambda: the Ultimate Design Flaw
Aahz
aahz at pythoncraft.com
Sat Apr 2 11:29:27 EST 2005
In article <Vrv3e.133894$dP1.471335 at newsc.telia.net>,
Sunnan <sunnan at handgranat.org> wrote:
>>> [Aahz]
>>>>
>>>>"The joy of coding Python should be in seeing short, concise, readable
>>>>classes that express a lot of action in a small amount of clear code --
>>>>not in reams of trivial code that bores the reader to death." --GvR
>
>It's just that I'm having a hard time matching that quote to what I
>though python was about. I thought boring code was considered a virtue
>in python. ("Explicit is better than implicit", "sparse is better than
>dense".)
>
>Because what is "boring"? The opposite of dense, tense, intense. Utterly
>predictable; it's like the combination of all my prejudices. Even before
>I knew, I thought "Bet Python separates statements from expressions".
Note very, VERY, *VERY* carefully that the quote says nothing about
"boring code". The quote explicitly refers to "reams of trivial code"
as boring -- and that's quite true. Consider this distinction:
if foo == 'red':
print 'foo is red'
elif foo == 'blue':
print 'foo is blue'
versus
print "foo is", foo
I'm sure you can think of many other examples -- real examples -- if you
put your mind to work; Guido's point is about the essential necessity of
refactoring and rewriting code for conciseness and clarity.
--
Aahz (aahz at pythoncraft.com) <*> http://www.pythoncraft.com/
"The joy of coding Python should be in seeing short, concise, readable
classes that express a lot of action in a small amount of clear code --
not in reams of trivial code that bores the reader to death." --GvR
More information about the Python-list
mailing list