From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,21960280f1d61e84 X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII-7-bit Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? References: <1169531612.200010.153120@38g2000cwa.googlegroups.com> <1mahvxskejxe1$.tx7bjdqyo2oj$.dlg@40tude.net> <2tfy9vgph3.fsf@hod.lan.m-e-leypold.de> <1g7m33bys8v4p.6p9cpsh3k031$.dlg@40tude.net> From: Markus E Leypold Organization: N/A Date: Thu, 01 Feb 2007 08:57:29 +0100 Message-ID: User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:SRGy8aoysAZJ3paWI+a/j1JKu2Y= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.246.10 X-Trace: news.arcor-ip.de 1170316356 88.72.246.10 (1 Feb 2007 08:52:36 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news4.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsfeed.arcor-ip.de!news.arcor-ip.de!not-for-mail Xref: g2news2.google.com comp.lang.ada:8810 Date: 2007-02-01T08:57:29+01:00 List-Id: Robert A Duff writes: > Markus E Leypold > writes: > >> Robert A Duff writes: >>> (Of course, the call stack is not quite a stack anymore, if >>> upward closures are allowed!) >> >> Depends. Just yesterday I've been imagining a system which basically >> uses a stack, but when passing a "closure" upwards, copies parts of >> the stack to the heap. >> >> Chicken scheme I think, also uses a stack (in som unusal ways), but >> still has closure. > > Well, yeah, that's the sort of thing I mean by "not quite a stack". Ah yes, of course. I did understand "not quite" as a cute way to say "actually the stack is a linked set of frames in the heap", but now I understand that you indicated your awareness of the various twists this issue can take (or can be made to take). > It's sort of like a stack, except some more-recently-pushed parts of > it need to survive longer, so the implementation copies things > to the heap, or allocates activation records in the heap in the > first place, or . Excactly. :-) > >>> It seems to me "inward" and "outward" closures would be clearer >>> terminology, for what are normally called "downward" and "upward", >>> respectively. >> >> What you call outward closures are just closure. > > Well, if a language supports both inward and outward (or downward and > upward, of you prefer), then people say it supports "full closures". > It doesn't make a lot of sense to support the outward/upward ones > without also supporting the inward/downward ones, too. Yes. I think the whole upward/downward magic talk is simply due to the fact that there is a case when people don't want GC and have a traditional stack and therefore do something like closures the cheap way: Closure data stays valid as long as the stack is not popped. This is the way downward closures come into the world. > >>... There was a >> discussion at comp.lang.functional which convinced me, that closure >> should better be called procdures... > > Yes, I saw part of that discussion. Yes, "closure" really just means > "procedure". We use "closure" (or "lexical closure") to emphasize the > fact that a "procedure" includes some environmental information in > addition to just the code. Which in a mathematical sense should be the default. If I say - let a = ... - let f(x) = a * proolify (x) ^ a and later (much later) say something like - let's call the coefficient (k1 * k7 ^ p4) a. nobody (no mathematician) would expect f to change. > "Closure" also emphasizes that there's something interesting about that > environment -- namely, that NESTED procedures may be passed around the > place (whether inward only, or both inward and outward). As should be the norm. >>... (because it's rathe the natural way >> how things should work) and what is presently called downwards closure >> should better be called somthing different, like, say stack bound >> procedures (to indicate that their lifetime depends on the stack). > > Perhaps. Pascal programmers just call them "procedural parameters". Even if they aren't passed around at the moment? Shouldn't a parameter be something passed to a procedure call? Regards -- Markus