unicode as valid naming symbols

Rustom Mody rustompmody at gmail.com
Tue Apr 1 22:58:02 EDT 2014


On Tuesday, April 1, 2014 9:29:27 PM UTC+5:30, Marko Rauhamaa wrote:
> Chris Angelico :

> > On Wed, Apr 2, 2014 at 12:16 AM, Marko Rauhamaa 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.

You are forgetting the main point: In scheme, in a named-let, the name
chosen was very often 'loop' (if I remember the PC scheme manuals
correctly).  IOW if you had a dozen loops implemented with
named-letted-tail-recursion, you could call all of them 'loop'.  How
is that different from calling all of them 'while' or 'for' ?


> 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.

Yeah... I guess that is the issue.
People brought up on imperative (which includes OO) programming, think
recursion and iteration are fundamentally different, just as assembly
language programmers think of memory and register as fundamentally
different. Sure is but if you are a C programmer the distinction is
irrelevant 99% of the time! 

Continues downward... For an assembly language programmer, memory and
cache-memory is not a distinction he needs to make 99% of the time. Not so for 
the hardware engineer



More information about the Python-list mailing list