Defending the ternary operator

Andrew Koenig ark at research.att.com
Sat Feb 8 10:27:45 EST 2003


Laura> I don't think that the relationship is that simple.  Some
Laura> things which are elegant are short.  Some things which are
Laura> obscure are also short.  Persuing shortness alone is not the
Laura> answer, or we would all be programming in APL.

If APL had not been so intransigent about avoiding control structures
and abstract data types, I think it would be orders of magnitude more
popular than it is today.

APL is a prime example of my claim that ease of comprehension is
proportional to brevity * familiarity: APL programs tend to be
extremely short, but because most of the functions are expressed as
symbols that give outsiders no clue to their meanings, they are
unreadable until you put in the effort to learn what the symbols mean.

Once you do know what they mean, APL programs are often much easier
to understand than their counterparts in other languages.

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




More information about the Python-list mailing list