do...until wisdom needed...

Steve Lamb grey at despair.rpglink.com
Tue Apr 17 11:40:18 EDT 2001


On Tue, 17 Apr 2001 10:15:06 -0400, Benjamin.Altman <benjamin.altman at noaa.gov>
wrote:
>While I wouldn't care either way for a loop.. until construct, I don't quite
>see how it is so complicated.

    It isn't complicated in and of itself.  Look at my example of Perl's
handling of a simple conditional expression.  6 different ways to express one
concept.  Taken individually each is not that difficult to understand.  Taken
together it is a maintenance nightmare.  I should know, I have to deal with
the "simplicity" of those 6 different ways to express one concept on a daily
basis at work.  My way of handling it is to force myself to standardize on the
most common and extensible format (if (!condition){}) and rewrite all other
forms to that when encountered.  Even then I am only reducing it to one of two
possible formats and dealing with precidence issues.

    Well, actually, 12 as someone has pointed out.  I'm sure we're missing
more.  12 with their own slightly variant way of doing things.  That is where
the complexity comes in.

    No, do..until is not that hard.  Heck, IIRC the language I learned
procedural programming in, Turbo Pascal, has it.  But having it when it
clearly isn't needed only adds unneeded complexity.

    What I find most ironic is this discussion was spawned by someone who
wants to reimpliment Python for an embedded system.  One would think that on
an embedded system that one would want to conserve space by using the least
number of variations of common concepts, not waste it implementing several
special cases.

-- 
         Steve C. Lamb         | I'm your priest, I'm your shrink, I'm your
         ICQ: 5107343          | main connection to the switchboard of souls.
-------------------------------+---------------------------------------------



More information about the Python-list mailing list