unicode as valid naming symbols
Chris Angelico
rosuav at gmail.com
Tue Apr 1 09:32:54 EDT 2014
On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa <marko at pacujo.net> wrote:
> I implemented the loops in the scheme way. Recursion is how iteration is
> done by the Believers. Traditional looping structures are available to
> scheme, but if you felt the need for them, you might as well program in
> Python.
Then I'm happily a pagan who uses while loops instead of recursion.
Why should every loop become a named function?
find_divisor: for ( factor = 2 ; i%factor ; factor++ )
{
if ( factor == i )
{
printf("%d\n",i);
count--;
break;
}
}
Does that label add anything? If you really need to put a name to
every loop you ever write, there's something wrong with the code; some
loops' purposes should be patently obvious by their body. All you do
is add duplicate information that might be wrong.
ChrisA
More information about the Python-list
mailing list