PEP-0315--Enhanced While Loop: An idea for an alternative syntax
Thu Feb 19 08:16:13 CET 2004
Josiah Carlson <jcarlson at nospam.uci.edu> writes:
> Sure, there is a difference between '==' becoming '=', and '=='
> becoming ':=', but the difference is 1 inch and a shift key on my
Oh come on, you're grasping at straws. What about the difference
between '>' and '<'? Those are even closer together than ':' and '='.
Do you want to get rid of those operations too? The '=' vs '==' thing
may actually confuse some people but it's hard to mistake := for
anything other than an assignment.
> I've made larger errors when typing than just an inch and a
> shift-key. I believe it would cause more bugs, reduce readability,
> and attempts to fix a problem that doesn't really exist.
That's sheer speculation on your part. You've cited the existence of
assignment expression errors causing 'more than one bug' in the
hundreds of millions of C code written over the past three decades.
That's not persuasive of anything, given how many other bugs there are
of just about every other sort. And in fact, the one in the Linux
kernel shows the opposite of what you're claiming. It wasn't an
accidental error that slipped through anything; it was a deliberate
hole that someone introduced hoping no one would notice, but it was
noticed immediately, showing that the =/== distinction is less
difficult to spot than you seem to think.
Assignment expressions have been used successfully in C and other
languages for many years, including plenty of them in the CPython
code. It's reasonable to say they're used all the time by some very
capable programmers and it's impertinent of you to imply that those
programmers don't know what they're doing. If you don't like them,
fine, don't use them, but don't try to convince people who use them
that they're wrong. What's a programming language like Python aiming
to do, anyway? Among other things, it aims to make programming
non-frustrating. So if a sizeable population of users find that the
absence of a particular useful feature is actually frustrating, give
some thought to the idea that the absence really is a shortcoming in
More information about the Python-list