Re: language design after Algol 60, was Add nested-function support

bartc <bc@freeuk.com>
Thu, 12 Apr 2018 19:40:17 +0100

          From comp.compilers

Related articles
[14 earlier articles]
Re: language design after Algol 60, was Add nested-function support derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2018-04-10)
Re: language design after Algol 60, was Add nested-function support DrDiettrich1@netscape.net (Hans-Peter Diettrich) (2018-04-11)
Re: language design after Algol 60, was Add nested-function support derek@_NOSPAM_knosof.co.uk (Derek M. Jones) (2018-04-11)
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 rpw3@rpw3.org (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 gneuner2@comcast.net (George Neuner) (2018-04-12)
Re: language design after Algol 60, was Add nested-function support gneuner2@comcast.net (George Neuner) (2018-04-12)
Re: language design after Algol 60, was Add nested-function support martin@gkc.org.uk (Martin Ward) (2018-04-13)
Re: language design after Algol 60, was Add nested-function support martin@gkc.org.uk (Martin Ward) (2018-04-13)
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)
[8 later articles]
| List of all articles for this month |

From: bartc <bc@freeuk.com>
Newsgroups: comp.compilers
Date: Thu, 12 Apr 2018 19:40:17 +0100
Organization: virginmedia.com
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
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
Content-Language: en-GB

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]


Post a followup to this message

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