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: bartc Newsgroups: comp.compilers Subject: Re: language design after Algol 60, was Add nested-function support Date: Thu, 12 Apr 2018 19:40:17 +0100 Organization: virginmedia.com Lines: 37 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <18-04-050@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> 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="65159"; mail-complaints-to="abuse@iecc.com" Keywords: history, design, comment Posted-Date: 12 Apr 2018 20:56:40 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:2066 On 12/04/2018 11:51, bartc wrote: > [Python certainly has a lot of theology.  I believe that python users > would say that your misssing features are implemented through simple > idioms and aren't worth gunking up the languages, e.g. repeat N times > is "for i in range(N):".  But like I said, it's theology. -John] (Just on that point, that is one of the simpler features and it is just neater syntax for something that can be expressed in other ways. But it is not adding extra syntax; if anything it is getting rid of it! If a for-loop starts like this: for i:=1 to n do ... Then by leaving out the bits not needed you end up with this: to n do ... A repeat-n-times loop (one that doesn't have to maintain an explicit loop counter accessible as a reference-counted variable from the source code). And an endless loop by leaving 'to n'. (This comes from Algol-68 actually; not my idea.) But even if extra syntax is needed, so what? Syntax is free, provided you don't go mad with it. Compare with the type system and libraries for which no such curbs appear to exist) -- bartc [Syntax is free in the compiler but not necessarily in the brains of the programmers. Back when I was writing PL/I programs, people said my code was unreadable because I'd learned PL/I from the reference manual, while everyone else learned it from books like "PL/I for Fortran progammers" or "PL/I for commercial programmers." My code used what seemed reasonable to me but others found it a mishmosh of stuff they knew and stuff they didn't. -John]