Chris Angelico <ros...@gmail.com>: > On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa <ma...@pacujo.net> wrote: >> I implemented the loops in the scheme way. Recursion is how iteration >> is done by the Believers. > > Then I'm happily a pagan who uses while loops instead of recursion. > Why should every loop become a named function?
Every language has its idioms. The principal aesthetic motivation for named-let loops is the avoidance of (set!), I think. Secondarily, you get to shift gears in the middle of your loops; something you can often, but not always, accomplish in Python with break, return and continue. Don't take me wrong. Python has its own idioms and avoiding loops in Python would be equally blasphemous. In C++ you avoid void pointers like the plague, in C you celebrate them. Marko -- https://mail.python.org/mailman/listinfo/python-list