Single line if statement with a continue

Cecil Westerhof Cecil at decebal.nl
Thu Dec 15 08:09:54 EST 2022


ram at zedat.fu-berlin.de (Stefan Ram) writes:

>>"No multiple returns" is often found in programming guidelines.
>
>   I religiously followed that when I did more C programming
>   than today. Then, I read an article about how the result
>   pattern makes functions measurably slower. (It should not
>   with an optimizing compiler, but it did due to those
>   measurements. Can't find that article now, though.)

That makes me think about the quote from Edsger W. Dijkstra about the
go to statement:
    Please do not fall into the trap of believing that I am terribly
    dogmatic about the go to statement. I have the uncomfortable
    feeling that others are making a religion out of it, as if the
    conceptual problems of programming could be solved by a simple
    trick, by a simple form of coding discipline! 

-- 
Cecil Westerhof
Senior Software Engineer
LinkedIn: http://www.linkedin.com/in/cecilwesterhof


More information about the Python-list mailing list