Re: language design after Algol 60

Andy Walker <anw@cuboid.co.uk>
Sun, 15 Apr 2018 00:04:13 +0100

          From comp.compilers

Related articles
[7 earlier articles]
Re: language design after Algol 60, was Add nested-function support DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2018-04-12)
Re: language design after Algol 60, was Add nested-function support bc@freeuk.com (bartc) (2018-04-12)
Re: language design after Algol 60, was Add nested-function support bc@freeuk.com (bartc) (2018-04-12)
Re: language design after Algol 60 robin51@dodo.com.au (Robin Vowels) (2018-04-14)
Re: language design after Algol 60 robin51@dodo.com.au (Robin Vowels) (2018-04-14)
Re: language design after Algol 60 bc@freeuk.com (bartc) (2018-04-14)
Re: language design after Algol 60 anw@cuboid.co.uk (Andy Walker) (2018-04-15)
Re: language design after Algol 60 robin51@dodo.com.au (Robin Vowels) (2018-04-17)
Re: Language design after Algol 60 robin51@dodo.com.au (Robin Vowels) (2018-04-18)
Re: language design after Algol 60 genew@telus.net (Gene Wirchenko) (2018-04-18)
Re: language design after Algol 60 martin@gkc.org.uk (Martin Ward) (2018-05-01)
| List of all articles for this month |

From: Andy Walker <anw@cuboid.co.uk>
Newsgroups: comp.compilers
Date: Sun, 15 Apr 2018 00:04:13 +0100
Organization: Not very much
References: <49854345-f940-e82a-5c35-35078c4189d5@gkc.org.uk> 18-03-103 18-03-042 18-03-047 18-03-075 18-03-079 18-03-101 18-04-002 18-04-003 18-04-004 18-04-024 18-04-034 18-04-041 18-04-046 18-04-050 18-04-065
Injection-Info: gal.iecc.com; posting-host="news.iecc.com:2001:470:1f07:1126:0:676f:7373:6970"; logging-data="65790"; mail-complaints-to="abuse@iecc.com"
Keywords: algol68, design
Posted-Date: 14 Apr 2018 21:03:31 EDT
Content-Language: en-GB

On 14/04/18 05:19, Robin Vowels wrote:
> From: "bartc" <bc@freeuk.com>
[...]
>> Then by leaving out the bits not needed you end up with this:
>>     to n do ...
> The control variable, i, must not be omitted.


Can't answer for Python [the previous topic] or for BartC's
own languages, but in Algol 68, as Bart referenced, it most certainly
can, and sometimes ought to be.


Specific examples:


      (a) Sometimes the control variable does not proceed by constant
increments:


              int i := 0;
              to n do ...; i +:= f(i) od


      (b) Sometimes the control variable, if present, might overflow, eg in
              the case of a loop that goes round more than "maxint" times:


              while ... do ... od


              [May be worth noting that RR3.5.2 Step 4 contains a bug in the
                printed version in this case, pointed out and corrected somewhere
                  in "Algol Bulletin". You could write "for i by 0 to 2 ..." but
                that is just silly.]


> It may be required for computations within the loop
> (including subscript references).


And it may not. Programmer's decision.


> Even if not explicitly referenced within the loop,
> its value will be required for fault finding (with error control
> and/or with debugger).


*May* be. Depends on the "error control" and "debugger", and
how they, if they exist, interact with the programmer, on what faults
may have occurred -- perhaps the code was already tested -- and on
the phase of the moon.


Personally, I'm not a big fan of the style police, nor of
languages that encourage them.


--
Andy Walker,
Nottingham.


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.