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 Path: g2news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newscon02.news.prodigy.net!prodigy.net!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: How come Ada isn't more popular? Date: Tue, 30 Jan 2007 14:58:03 -0500 Organization: The World Public Access UNIX, Brookline, MA Message-ID: 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> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls4.std.com 1170187086 20605 192.74.137.71 (30 Jan 2007 19:58:06 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Tue, 30 Jan 2007 19:58:06 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:khSQJWtt1RQi7u+fFcszdET5ffM= Xref: g2news2.google.com comp.lang.ada:8732 Date: 2007-01-30T14:58:03-05:00 List-Id: 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? 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!). 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!) It seems to me "inward" and "outward" closures would be clearer terminology, for what are normally called "downward" and "upward", respectively. - Bob