Defending the ternary operator

Ian Bicking ianb at colorstudy.com
Sat Feb 8 02:58:16 EST 2003


On Sat, 2003-02-08 at 01:01, Laura Creighton wrote:
> Regardless of the reasons some people _want_  conditionals, people
> are going to _use_ them because they save keystrokes. The number of
> people who will do anything to save keystrokes is legion. 

Why do you lack such faith in programmers?  Python is the programmer's
friend, not the programmer's keeper.  What trauma you have suffered at
the hands of inferior code should not blind you.  Beautiful code is
something that is nurtured and *created*.  You cannot attain it by
forming an environment where all bad techniques are outlawed, based on
the expectation that given no other options the bad programmer will
somehow write beautiful code.  It would be like taking a cast of a
beautiful orchid, then seeding a ragweed beneath the cast.  The ragweed
will not become an orchid simply because no other shape is allowed it.

Ugly code can be thrown away.  That task is easy.  Our efforts should
focus on the beautiful code, because that is the difficult task and the
worthwhile task.  We should judge this extension to the language with
our aspiration, not with our fears.

-- 
Ian Bicking  ianb at colorstudy.com  http://colorstudy.com
4869 N. Talman Ave., Chicago, IL 60625  /  773-275-7241
"There is no flag large enough to cover the shame of 
 killing innocent people" -- Howard Zinn





More information about the Python-list mailing list