Concrete Proposal: while ... and while ...

William Tanksley wtanksle at dolphin.openprojects.net
Thu May 20 23:20:09 EDT 1999


On Thu, 20 May 1999 21:51:41 GMT, Paul Prescod wrote:
>"Andrew M. Kuchling" wrote:

>>         I don't see why do...while would break code.  

>Python keywords can't be used as variable names. Today, "do" could be a

>If we loosened the rule against using keywords, or made an exception for
>"do" then it could be implemented in a backwards-compatible manner by
>looking for the colon. I find I often want to use class as a variable
>name...

I'd really like to loosen the rule.  Really, reserving words doesn't give
any significant speedup in modern parsers.

We don't want people to use our keywords, but so what if they do?  It's
their call; doesn't need to be ours.

...remembering PL/1...  One of PL/1's design goals was that if any invalid
expression had a reasonable meaning, that meaning would be made official.
There were thousands of keywords and zero reserved words.  The classical
example of obfusicated PL/1 code is "if if then then = else else else
endif".  And that's not one of the special cases, that's just an example
of non-reserved keywords.

Tons of room for abuse -- but if anyone starts saying that "we don't want
to allow that disgusting code" I'm going to attack them with an email I
recieved while trying to persuade the developers of a new game to adopt
Python.

They pointed out that this code: "if x < y > z == c+1 >= 4:" was terrible,
and they didn't want to have anything to do with a language which allowed
such a construct.  So I left and let them design their own language.  The
project's been dead for quite some time (a pity).

> Paul Prescod  - ISOGEN Consulting Engineer speaking for only himself

-- 
-William "Billy" Tanksley
"But you shall not escape my iambics."
           -- Gaius Valerius Catullus




More information about the Python-list mailing list