mutability, namimg, ... (was Re: Choosing a programming language as a competitive tool)

Mark Jackson mjackson at wrc.xerox.com
Tue May 8 10:35:02 EDT 2001


"Alex Martelli" <aleaxit at yahoo.com> writes:

> is funny that way, at times.  I think the widespread keywords
> "break" and "continue" are such examples of egregiously bad
> naming (and for once Perl with "last" and "next" had a better
> idea), for example.  Particularly when moving from Fortran,
> the idea that suddenly 'continue' is NOT any more the exact
> equivalent of a Python 'pass' -- a do-nothing statement that
> just continues onwards, and acts as a useful place-holder --
> but is in fact a "goto start-of-loop", IS mind-boggling... yet
> people don't forget that once learned.

I found Python's "break" and "continue" perfectly natural.  Not only
is Fortran my computational mother tongue, I had a possibly confounding
background in Ratfor (which uses "break" and "next" so that "continue"
can keep its Fortran meaning).

What I *do* find counterintuitive is Python's use of "else" in "while",
"for", and "try" constructs.  But that's because it seems backwards
relative to its meaning in Python's "if" rather than in some other
language.

-- 
Mark Jackson - http://www.alumni.caltech.edu/~mjackson
	In any business model you need someone to sue.
	That's the American way.	- Bill Weinberg





More information about the Python-list mailing list