Defending the ternary operator

Laura Creighton lac at strakt.com
Sat Feb 8 12:56:54 EST 2003


> Laura> Because I am one.  Because I know so many of them.  Because
> Laura> 'lazy work' and 'hurried work' has been the bane of all
> Laura> creators since we first started creating anything.
> 
> As an experiment, I went back through a 2800-line C program that I
> wrote about 20 years ago (!) to see how often I used ?: and in what
> context.  I figure that reading my own 20-year-old code is probably a
> lot like reading some else's code.

The fact that you would not abuse a ternary does nothing to put my
mind at rest.  I've wished for a world where all the C and C++
programs I have encountered have been written by you, many times,
sometimes in those exact words, as well.

If you don't think that it will be used very often, do you admit that it
might be on the side of 'diminishing returns', a feature request that
doesn't 'pull enough weight' to be worth doing?  Or do you think that any
language feature that is of use to somebody should automatically go into
a language to 'add desired functionality'?  I doubt very much that you
believe this, (though if you do, we have found the disagreement, for
certain).  How do you determine if a proposed language feature 'pulls
enough weight'? 

Laura





More information about the Python-list mailing list