Re: Which kid's beginners programming - Python or Forth?

Discussion in 'Python' started by Adriaan Renting, Jun 28, 2005.

  1. 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:
    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 <> 06/28/05 11:39 AM >>>

    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
     
    Adriaan Renting, Jun 28, 2005
    #1
    1. Advertisements

  2. Adriaan Renting

    Roy Smith Guest

    "Adriaan Renting" <> wrote:
    > 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.


    And, even if they're not called "for" or "while" (they might be "do",
    "foreach", "repeat...until", etc), the basic idea of a looping construct
    which defines how many times an enclosed group of statements will be
    executed is absolutely universal. I can't think of a language from
    assembler to HyperCard that doesn't have a version of the "for" loop.
     
    Roy Smith, Jun 28, 2005
    #2
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. John Benson
    Replies:
    4
    Views:
    871
    David M. Cooke
    Jan 9, 2004
  2. Doug Mitchell
    Replies:
    6
    Views:
    506
  3. BORT
    Replies:
    38
    Views:
    1,504
    =?iso-8859-1?B?QW5kcuk=?=
    Jul 2, 2005
  4. John Doty
    Replies:
    42
    Views:
    1,001
    Elizabeth D Rather
    Oct 16, 2006
  5. astral orange
    Replies:
    18
    Views:
    4,984
    Jon Clements
    Dec 1, 2009
  6. harrismh777
    Replies:
    2
    Views:
    623
    harrismh777
    Jul 28, 2011
  7. Patty
    Replies:
    0
    Views:
    285
    Patty
    Jul 28, 2011
  8. Replies:
    2
    Views:
    302
Loading...