Defending the ternary operator

Laura Creighton lac at strakt.com
Sat Feb 8 20:42:45 CET 2003


> On Sat, 8 Feb 2003, 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.
> 
> But how effectively can the language police peoples' laziness, and should
> it? I mean, a lazy developer could just as easily save keystrokes by using
> all one- and two-character variable names, indenting only a single space,
> and not writing any comments. The same laziness (lack of discipline) will
> manifest itself in a lack of architecture/design, lack of tests, etc.
> 
> Pair programming or code reviews or even some good old fashioned mentoring
> is the place to encourage best practices and discourage bad ones - not the
> language.

I don't understand this reasoning.  It means that the people who don't
have anybody to mentor them are stuck with _another_ uncorrected bad
practice, which they are probably unaware of, and people who are
mentoring have yet another thing to decide when to forbid and how to
teach.  I've already got plenty of languages where this is the case.
I rather liked finding one where I got code I more or less liked
automatically, and which almost never made me wince.

Laura
> 
> -Dave
> 
> -- 
> http://mail.python.org/mailman/listinfo/python-list





More information about the Python-list mailing list