Path: csiph.com!weretis.net!feeder6.news.weretis.net!feeder.usenetexpress.com!feeder-in1.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!news.iecc.com!.POSTED.news.iecc.com!nerds-end From: Andy Walker Newsgroups: comp.compilers Subject: Re: language design after Algol 60 Date: Sun, 15 Apr 2018 00:04:13 +0100 Organization: Not very much Lines: 49 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-04-071@comp.compilers> References: <49854345-f940-e82a-5c35-35078c4189d5@gkc.org.uk> <18-03-103@comp.compilers> <18-03-042@comp.compilers> <18-03-047@comp.compilers> <18-03-075@comp.compilers> <18-03-079@comp.compilers> <18-03-101@comp.compilers> <18-04-002@comp.compilers> <18-04-003@comp.compilers> <18-04-004@comp.compilers> <18-04-024@comp.compilers> <18-04-034@comp.compilers> <18-04-041@comp.compilers> <18-04-046@comp.compilers> <18-04-050@comp.compilers> <18-04-065@comp.compilers> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit 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 X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Content-Language: en-GB Xref: csiph.com comp.compilers:2082 On 14/04/18 05:19, Robin Vowels wrote: > From: "bartc" [...] >> 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.