Python and Flaming Thunder
Duncan Booth
duncan.booth at invalid.invalid
Thu May 22 04:33:42 EDT 2008
Torsten Bronger <bronger at physik.rwth-aachen.de> wrote:
>>>> Read data from "input.txt".
>>>> If data is an error then go to ...
>>>
>>> Arf ! A goto !
>>
>> You are surely aware of the fact that the C source of python also uses
>> goto at tons of places. Is that Arf! too?
>
> In the hands of a skilled person who really knows what he/she does,
> it can be a useful statement. But this collides with the goals of
> FT, which claims to be simple to use. Besides, the above use case
> for a goto is definitively awful.
>
My problem with the code isn't so much the 'go to', its the idea that you
have to check the result of the read. That implies that any unchecked
errors will go undetected. Ick.
--
Duncan Booth http://kupuguy.blogspot.com
More information about the Python-list
mailing list