[Edu-sig] Research on best language to use for teaching beginners

Andrew Harrington aharrin at luc.edu
Fri Oct 2 18:05:02 CEST 2015


Look at page 19 on how the loop syntax was used!  It was used just for
 "repeat n times" - really simple, (and with a trivial useless loop body).
 "while" is for a more complicated situation (in general) where there the
number of repetitions is controlled by a significant and flexible
condition.  Such loops (particularly with code to prepare for the next time
through the loop) are likely the most difficult for my students to
understand, but I am not convinced that it is because of the word keyword
used, but just because of the more complicated real situation.

Also the keywords were not tested when a definite collection of objects was
being iterated over, as opposed to a simple repetition or an artificial
sequence created just to repeat.  Then foreach sounds like a clear winner,
likely somewhat better than to shorter Python "for".

"while" and "for" require complicated additional syntax if you just want
"repeat n times".  The question then becomes whether adding special syntax
for a simple repetition complicates the overall learning situation more
than sticking with fewer keywords and depending on flexible synthesis, like
using "for" with "range" in Python.  This is the only thing I get out of
the looping section of the article.  I find the table very misleading.

Dr. Andrew N. Harrington
  Computer Science Department
  Graduate Program Director gpd at cs.luc.edu
  Loyola University Chicago
  529 Lewis Towers, 111 E. Pearson St. (Downtown)
  417 Cudahy Science Hall (Rogers Park campus)
http://www.cs.luc.edu/~anh
Phone: 312-915-7982
Fax:    312-915-7998
aharrin at luc.edu (as professor, not gpd role)

On Fri, Oct 2, 2015 at 9:02 AM, David Handy <david at handysoftware.com> wrote:

> On Thursday, October 1, 2015 4:50pm, "Andre Roberge" <
> andre.roberge at gmail.com> said:
>
>
> ...
>
>
> The best keywords (combining result from the two groups) are thought to
> include: repeat, again, loop, cycle
> The worst keywords are thought to include: foreach, while, echo,
> duplicate, for .... with "for" getting the worst result of all.
> Now that you mention it, I have hazy memories from > 30 years ago, when I
> was learning BASIC, of puzzling over the meaning of the FOR keyword and
> wondering why they chose that word. So I'm not surprised to see that on the
> list of difficult keywords.
> However, the WHILE keyword in BASIC was intuitive for me. So it surprises
> me to see that on their list of bad keywords.
> David H
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/edu-sig/attachments/20151002/2b4f70a5/attachment.html>


More information about the Edu-sig mailing list