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: Tue, 30 Jan 2007 22:52:49 +0100 Message-ID: User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:mgv0aGNolK+zBoObIGox3SbXwlg= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.72.211.30 X-Trace: news.arcor-ip.de 1170193679 88.72.211.30 (30 Jan 2007 22:47:59 +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:8751 Date: 2007-01-30T22:52:49+01:00 List-Id: Robert A Duff writes: > Markus E Leypold > writes: > >> If yout have only downward scopes for "closures" and memory allocation >> this will, finally, interact badly with the fact that "implicit >> (i.e. static type safe) casting" of classes is also only possible >> downwards. My impression is, that all these things together rule out >> some useful designs, that would otherwise possible. Or to say it >> differenty: Object orientation w/o indeterminable scopes, upward >> closures and GC doesn't work well. Some abstractions cannot be >> implemented. > > Why do we call these closures "downward" and "upward" instead of the > other way around? I don't know. It's a pathological condition anyway :-). I'm using this vocabulary as I find it. > A downward closure (allowed in Ada 2005, and to some > extent in Ada 83) is a procedure that is passed IN to another procedure, > which is toward the TOP of the call stack (up!). It's passed downward th call chain. > An upward closure (not > directly supported in Ada, but supported in Lisp et al) is a procedure > that is passed OUT (return value, 'out' parameter, setting a global > variable) -- which means it's being passed DOWN toward the BOTTOM of the > call stack. > (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. > 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. There was a discussion at comp.lang.functional which convinced me, that closure should better be called procdures (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). But it's certainly too late now to change established if misleading terminology. Regards -- Markus