do...until wisdom found...

Ken Peek Peek at LVCM.comNOSPAM
Tue Apr 17 02:02:21 EDT 2001


OK--

In MY new language (NOT Python, but a new language "in the nature of" Python):

I would make the "do/until" syntax like this:

do:
    # some stuff
    # some more stuff
    until condition

The "until" line must be the last line in the block, or we get a complaint from
the parser.

This is roughly equivalent to the code:

while(1):
    # some stuff
    # some more stuff
    if condition: break

We just simply replace the "while(1):" with a "do:", and the "if condition:
break" with a "until condition".  If Python (or MY language) had a macro
preprocessor, this would be easy to do in that stage.  This looks about the way
most people like to use Python, and so the "do/until" construct is an easy jump.

Some people have suggested that "loop:" is a much better keyword than "do:".
Now I am wondering if they are right-- maybe so.  I will have to think about
that some more-- maybe "loop:" IS more readable (by a programming newbie) than
"do:"...   hmmm....

Can anybody think of a good name for a "Python-like" new language for small
embedded processors?
Let's see-- "tinyPython"?  nope-- has "Python" in it-- might make Guido mad.
Hmmm, maybe "Dragon"?  Probably used by someone else?  Hmmm... maybe ???

Any ideas?






More information about the Python-list mailing list