gratuitous new features in 2.0

Alex Martelli alex at magenta.com
Sat Aug 26 12:13:57 EDT 2000


"Grant Griffin" <g2 at seebelow.org> wrote in message
news:39A78701.720CCEA4 at seebelow.org...
    [snip]
> Whatever code breakage caused by "to" can easily be repaired.  (And
> programmers who use "to" as an identifier deserve what they get. <wink>)

These are the kinds of remarks that might end up letting me
swallow the ugly "print >>" syntax (I understand it will be
there whether I swallow it or not, but still it sticks in my throat),
just because adding a keyword to an existing language is such
a horrid situation, and yet it keeps getting belittled...!  Winks
or no winks, this makes my skin crawl.

What's wrong with 'to' as an identifier?  It's bad enough that
I can't use 'from'.  How many more perfectly good English
words should a programmer today eschew, just in case one
day they're seen as neat syntax sugar for some other silly
purpose, and his programs wantonly broken as a result? Puh-
leeze.

A built-in print function would still be my preferred solution to
the redirected-print problem -- print as a statement is fine for
beginners, quick hacks, etc, but given the situations in which
it's used there's no real problem moving to a function for more
advanced/solid uses.  Non-built-in function (in sys or whatever)
and method-on-file-objects are close-2nd and more distant 3rd
in the hierarchy of my preferences (as the latter does not easily
generalize to file-like user objects -- although a mixin class
might help).  But "print >> file", in 4th place, is still heads and
shoulders above anything requiring more keywords -- be it
new overloads to already-overloaded ones like "in", or, even
worse, completely new ones.


Alex






More information about the Python-list mailing list