Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!news-out.readnews.com!news-xxxfer.readnews.com!news.misty.com!news.iecc.com!.POSTED!nerds-end From: Marco van de Voort Newsgroups: comp.compilers Subject: Re: Is multi-level function return possible? Date: Sun, 16 Mar 2014 18:39:14 +0000 (UTC) Organization: Stack Usenet News Service Lines: 14 Sender: news@iecc.com Approved: comp.compilers@iecc.com Message-ID: <14-03-045@comp.compilers> References: <14-03-020@comp.compilers> <14-03-022@comp.compilers> <14-03-025@comp.compilers> <14-03-030@comp.compilers> <14-03-044@comp.compilers> NNTP-Posting-Host: news.iecc.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: miucha.iecc.com 1395068622 71437 2001:470:1f07:1126:0:676f:7373:6970 (17 Mar 2014 15:03:42 GMT) X-Complaints-To: abuse@iecc.com NNTP-Posting-Date: Mon, 17 Mar 2014 15:03:42 +0000 (UTC) Keywords: Pascal, code, history Posted-Date: 17 Mar 2014 11:03:42 EDT X-submission-address: compilers@iecc.com X-moderator-address: compilers-request@iecc.com X-FAQ-and-archives: http://compilers.iecc.com Xref: csiph.com comp.compilers:1167 On 2014-03-16, 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's more the rise of OOP in Pascal than need for a real closure. This functionality was mostly used to parameterize code with other code, something that was steered more in the direction of OOP and inheritance/virtual methods. Fun fact is that Turbo Pascal, while not supporting the functionality, still used it for a generic ForEach functionality on its container type. Using some assembler frame trickery.