Which kid's beginners programming - Python or Forth?

Adriaan Renting renting at astron.nl
Tue Jun 28 07:27:07 EDT 2005


In addition, for and while loops are pretty universally found in all
program languages. It is therefore an essential part of material
supposed to teach programming.

Adriaan Renting        | Email: renting at astron.nl
ASTRON                 | Phone: +31 521 595 217
P.O. Box 2             | GSM:   +31 6 24 25 17 28
NL-7990 AA Dwingeloo   | FAX:   +31 521 597 332
The Netherlands        | Web: http://www.astron.nl/~renting/
>>> Daniel Dittmar <daniel.dittmar at sap.corp> 06/28/05 11:39 AM >>>
gatti at dsdata.it wrote:
> List comprehensions, however, *are* the basic control flow; loops are
> much more verbose and they should be used only when necessary.

List comprehensions are probably a bad idea for entry level programmers:
- for and while loops are much easier to debug as you can insert print 
statements everywhere
- list comprehensions don't allow you to break complex expressions into 
several simpler ones by using local variables, everything has to happen 
in one expression

Daniel
-- 
http://mail.python.org/mailman/listinfo/python-list




More information about the Python-list mailing list