Re: Is multi-level function return possible?

Bill Findlay <yaldnif.w@blueyonder.co.uk>
Mon, 17 Mar 2014 16:15:27 +0000

          From comp.compilers

Related articles
[19 earlier articles]
Re: Is multi-level function return possible? DrDiettrich1@aol.com (Hans-Peter Diettrich) (2014-03-15)
Re: Is multi-level function return possible? usenet@bitblocks.com (Bakul Shah) (2014-03-15)
Re: Is multi-level function return possible? noitalmost@cox.net (noitalmost) (2014-03-15)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-16)
Re: Is multi-level function return possible? marcov@toad.stack.nl (Marco van de Voort) (2014-03-16)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-16)
Re: Is multi-level function return possible? yaldnif.w@blueyonder.co.uk (Bill Findlay) (2014-03-17)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-18)
Re: Is multi-level function return possible? news@cuboid.co.uk (Andy Walker) (2014-03-21)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-21)
Re: design of PL/I, was Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-21)
Re: Is multi-level function return possible? anton@mips.complang.tuwien.ac.at (2014-03-24)
Re: Is multi-level function return possible? gah@ugcs.caltech.edu (glen herrmannsfeldt) (2014-03-24)
[8 later articles]
| List of all articles for this month |

From: Bill Findlay <yaldnif.w@blueyonder.co.uk>
Newsgroups: comp.compilers
Date: Mon, 17 Mar 2014 16:15:27 +0000
Organization: Compilers Central
References: 14-03-020 14-03-022 14-03-025 14-03-030 14-03-044 14-03-046
Keywords: Pascal, algol60, history, comment
Posted-Date: 17 Mar 2014 12:20:04 EDT

On 16/03/2014 19:45, "Andy Walker" <news@cuboid.co.uk> wrote:


> On 16/03/14 17:19, Anton Ertl wrote:
>> Language design note: Given that nested functions have fallen out of
>> favour in the Algol-family world (in C and its offspring), I wonder if
>> they only really gain usefulness when combined with first-class
>> closures.


It would be wrong to imply that "the Algol-family world" consists of "C and
its offspring". Algol has many descendants that have have remained more
loyal to their family traditions, Ada 2012 first among them.


> They are also useful for variable hiding and space reclamation.
> If all functions are at the outermost level, then they can only access
> local or global variables, and so can communicate with each other only
> via globals or parameters. Global space can never be reclaimed except
> through sophisticated optimisations, and parameters have a run-time cost.


Exactly. Nested functions also permit information hiding and the tidying of
code by the introduction of abstractions that have only local relevance.


--
Bill Findlay
with blueyonder.co.uk;
use surname & forename;
[C fakes it with module static, but I take your point. -John]


Post a followup to this message

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