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

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

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. Doug Mitchell
    Replies:
    6
    Views:
    393
  2. BORT
    Replies:
    38
    Views:
    1,313
    =?iso-8859-1?B?QW5kcuk=?=
    Jul 2, 2005
  3. infidel

    threadsafety in cherrypy with kid

    infidel, Aug 18, 2005, in forum: Python
    Replies:
    0
    Views:
    287
    infidel
    Aug 18, 2005
  4. Brandon K

    Confused on Kid

    Brandon K, Oct 10, 2005, in forum: Python
    Replies:
    2
    Views:
    307
    Damjan
    Oct 25, 2005
  5. spooky
    Replies:
    2
    Views:
    287
    spooky
    Jul 7, 2006
Loading...

Share This Page