[Python-ideas] Simpler syntax for basic iterations

Rustom Mody rustompmody at gmail.com
Mon Oct 12 10:01:15 CEST 2015


On Monday, October 12, 2015 at 11:41:06 AM UTC+5:30, Terry Reedy wrote:
>
> On 10/11/2015 5:47 PM, Luciano Ramalho wrote: 
> > I've felt the same need Andre described, and so far I have not seen a 
> > convincing argument against his proposal to accept this syntax: 
>
> Your logic is backwards.  The default answer to 'add this' is 'No'.  The 
> burden of persuasion is on you.  The people who have to be persuaded, by 
> their own standards of goodness for Python, are Guido and core developers 
>

Just to clarify my earlier post:  I dont regard this suggestion as a 
serious contender for python.

I would however like it that if someone forked and added this to (a 
probably heavily cut-down) python, that fork be regarded as a 
friendly-by-default fork
In my personal estimate: of such talk 1% will go from being vaporware to 
something others can actually try out
Of that 1%, 0.1% can become a serious competitor for (C)Python 
 

>
> > 
> > for n:  # repeat block n times 
> >       fd(100) 
> >       lt(360/n) 
> > 
> > Where n is any expression that evaluates to an integer. 
>
> Andre wanted, I believe, 'for <literal number>:' to avoid naming 
> numbers, or at least variable quantities.  But I am 'not convinced'. 
> The above should be 
>
> turn = 360/n 
> for n: 
>    fd(100) 
>    lt(turn) 
>
> Anyway, very young kids get the concept of 'variable quantity': number 
> of days left to Christmas, number of cookies handed out, etc. 
>
>
I just attended some lectures in which a gifted teacher used Jupyter 
(ipython) to give abstruse linear algebra intuitions to kids.
So yes a good teacher can convey variables to kids.

Is it a good idea to do so?

I remember as a 10-11 year old having a hard time going from arithmetic to 
algebra.

Current day imperative languages makes this (in my experience inherent) 
hardness harder on 2 more counts:
- the variable is time-varying
- the assignment is denoted with '=' which is a confusing synonym/homonym 
to the math equality

And so the teacher trying to disentangle all this confusingness is to be 
supported (in my book)

Its another matter that python is not a 'for-kids' language so it need not 
change to incorporate this.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20151012/7be30e94/attachment.html>


More information about the Python-ideas mailing list