Defending the ternary operator

Andrew Koenig ark at research.att.com
Sat Feb 8 10:24:12 EST 2003


Paul> Why do you think saving keystrokes impairs readability?
Paul> Usually, for me at least, a shorter program is easier to read,
Paul> not harder.

As I noted (with variations) in another thread, I think that
readibility is proportional to brevity * familiarity.
So something short but unfamiliar is hard to read until you
become familiar with it.

The essence of Laura's argument, I think, is that many programmers
will not become familiary with if-expressions, as they're used only
from time to time, which means that when they do encounter them,
it will be a mental stumbling block.


-- 
Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark




More information about the Python-list mailing list