why no "do : until"?

Grant Edwards grante at visi.com
Tue Jan 2 16:06:33 EST 2001


In article <slrn94tqkh.150.grey at teleute.rpglink.com>, Steve Lamb wrote:
>On Sat, 30 Dec 2000 21:12:13 -0500, Peter Hansen <peter at engcorp.com> wrote:

>>I understand the point you are making; I'm just pointing out that the
>>opposing views seem well-founded.  Areas where I think you missed the
>>point are in the importance of code maintainability, the increased
>>complexity with your suggested approach, and the feelings of the "entire
>>CS community" on this issue.
>
>    I seriously doubt that initing a variable before use causes either code
>maintainability problems or increased complexity.

The problem is that when you decide to change the endpoint from
25 to something else, you _may_ have to change the code in two
places: the test and the initialization.  If you decide to
raise the endpoint from 25 to 50, you only have to change one
line.  If you want to lower it you might have to change the
initialization also.  

Requiring edits to two possibly widely seperated places in the
source code to change a single algorithm value is (in my
experience) going to cause a bug some day.

-- 
Grant Edwards                   grante             Yow!  Yow! And then we
                                  at               could sit on the hoods of
                               visi.com            cars at stop lights!



More information about the Python-list mailing list