Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

Lisp Users: Due to the holiday next Monday, there will be no garbage collection.


devel / comp.lang.python / Re: Friday Finking: Contorted loops

SubjectAuthor
o Re: Friday Finking: Contorted loopsAlan Gauld

1
Re: Friday Finking: Contorted loops

<mailman.683.1631283455.4164.python-list@python.org>

  copy mid

https://www.novabbs.com/devel/article-flat.php?id=15089&group=comp.lang.python#15089

  copy link   Newsgroups: comp.lang.python
Path: i2pn2.org!i2pn.org!news.swapon.de!fu-berlin.de!uni-berlin.de!not-for-mail
From: alan.ga...@yahoo.co.uk (Alan Gauld)
Newsgroups: comp.lang.python
Subject: Re: Friday Finking: Contorted loops
Date: Fri, 10 Sep 2021 12:26:24 +0100
Lines: 37
Message-ID: <mailman.683.1631283455.4164.python-list@python.org>
References: <097bf31d-44e8-da35-df41-3834524716c9@DancesWithMice.info>
<she6e0$3bi$1@ciao.gmane.io> <shffd3$p0h$1@ciao.gmane.io>
Mime-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
X-Trace: news.uni-berlin.de NdVrX0rrr1QdWDtlp5FOVgLc0DnDrI/UTI2R7xXITz0A==
Return-Path: <python-python-list@m.gmane-mx.org>
X-Original-To: python-list@python.org
Delivered-To: python-list@mail.python.org
Authentication-Results: mail.python.org; dkim=none reason="no signature";
dkim-adsp=none (unprotected policy); dkim-atps=neutral
X-Spam-Status: OK 0.002
X-Spam-Evidence: '*H*': 1.00; '*S*': 0.00; '(which': 0.04; 'url-
ip:65/8': 0.05; 'loop': 0.07; 'construct': 0.09; 'message-
id:@ciao.gmane.io': 0.09; 'received:ciao.gmane.io': 0.09;
'received:gmane.io': 0.09; 'received:list': 0.09; 'terry': 0.09;
'flickr': 0.16; 'from:addr:alan.gauld': 0.16; 'from:name:alan
gauld': 0.16; 'loops': 0.16; 'loops,': 0.16; 'photo-blog': 0.16;
'received:116.202': 0.16; 'received:116.202.254': 0.16;
'received:116.202.254.214': 0.16; 'url-ip:79.170.44.132/32': 0.16;
'url-ip:79.170.44/24': 0.16; 'url-ip:79.170/16': 0.16; 'url-
ip:79/8': 0.16; 'url:alan-g': 0.16; 'url:alan_gauld': 0.16;
'url:alangauldphotos': 0.16; 'wider': 0.16; 'wrote:': 0.16;
'syntax': 0.16; 'python': 0.16; 'url:amazon': 0.20; 'language':
0.22; 'to:addr:python-list': 0.23; 'purpose': 0.26; '(as': 0.27;
'function': 0.28; 'this?': 0.28; 'done': 0.28; '(and': 0.30;
'header:User-Agent:1': 0.31; 'there': 0.31; 'but': 0.31;
'program': 0.33; 'using': 0.33; 'header:In-Reply-To:1': 0.33;
'case.': 0.35; 'at:': 0.37; 'possibly': 0.37; "that's": 0.37;
'special': 0.37; 'author': 0.38; 'use': 0.38; 'include': 0.40;
'least': 0.40; 'could': 0.40; 'research': 0.60; 'hope': 0.61;
'simply': 0.62; 'later': 0.63; 'follow': 0.63; 'everything': 0.64;
'experience': 0.64; 'look': 0.66; 'site': 0.69; 'url:author':
0.69; 'received:116': 0.71; 'tools': 0.75; 'more.': 0.81;
'extent': 0.84; 'horrible': 0.84; 'lesser': 0.84; 'merely': 0.84
X-Injected-Via-Gmane: http://gmane.org/
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101
Thunderbird/78.13.0
In-Reply-To: <she6e0$3bi$1@ciao.gmane.io>
Content-Language: en-GB
X-Mailman-Approved-At: Fri, 10 Sep 2021 10:17:34 -0400
X-BeenThere: python-list@python.org
X-Mailman-Version: 2.1.34
Precedence: list
List-Id: General discussion list for the Python programming language
<python-list.python.org>
List-Unsubscribe: <https://mail.python.org/mailman/options/python-list>,
<mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive: <https://mail.python.org/pipermail/python-list/>
List-Post: <mailto:python-list@python.org>
List-Help: <mailto:python-list-request@python.org?subject=help>
List-Subscribe: <https://mail.python.org/mailman/listinfo/python-list>,
<mailto:python-list-request@python.org?subject=subscribe>
X-Mailman-Original-Message-ID: <shffd3$p0h$1@ciao.gmane.io>
X-Mailman-Original-References: <097bf31d-44e8-da35-df41-3834524716c9@DancesWithMice.info>
<she6e0$3bi$1@ciao.gmane.io>
 by: Alan Gauld - Fri, 10 Sep 2021 11:26 UTC

On 10/09/2021 00:47, Terry Reedy wrote:

> even one loop is guaranteed.) "do-while" or "repeat-until is even rarer
> since fractional-loop include this as a special case.

Is there any empirical evidence to support this?
Or is it just a case of using the tools that are available?
In my experience of using Pascal (and much later with Delphi)
that I used repeat loops at least as often as while loops,
possibly more.

But using Python and to a lesser extent C (which has a
rather horrible do/while) construct I use while loops
(often with an if-break) simply because that's what
the language offers.

So is it the case that the "need" for repeat loops is
rare, simply a result of there being no native repeat
loop available? After all we could have done without
a for loop too and just used a while loop for
everything (as was done in Oberon(?) ) Would we
then state that the use of for loops was rare?
But I would hope that any empirical research would
look at the wider function of the loop and its
purpose rather than merely analyzing the syntax
and keywords.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.amazon.com/author/alan_gauld
Follow my photo-blog on Flickr at:
http://www.flickr.com/photos/alangauldphotos

1
server_pubkey.txt

rocksolid light 0.9.8
clearnet tor