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: in defense of GC 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> <14hm72xd3b0bq$.axktv523vay8$.dlg@40tude.net> <4zwt33xm4b.fsf@hod.lan.m-e-leypold.de> <1j7neot6h1udi$.14vp2aos6z9l8.dlg@40tude.net> <1pzx3y7d2pide.y744copm0ejb$.dlg@40tude.net> <1aqj1657qjei9.1umdok28t0trz$.dlg@40tude.net> From: Markus E Leypold Organization: N/A Date: Mon, 05 Feb 2007 15:03:07 +0100 Message-ID: <5wabzsr9b8.fsf@hod.lan.m-e-leypold.de> User-Agent: Some cool user agent (SCUG) Cancel-Lock: sha1:qBPI12rAGqkYASEsqI0MQwhj8fo= MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii NNTP-Posting-Host: 88.74.38.71 X-Trace: news.arcor-ip.de 1170683885 88.74.38.71 (5 Feb 2007 14:58:05 +0200) X-Complaints-To: abuse@arcor-ip.de Path: g2news2.google.com!news3.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:9002 Date: 2007-02-05T15:03:07+01:00 List-Id: "Dmitry A. Kazakov" writes: > On Sun, 04 Feb 2007 23:47:29 +0100, Markus E Leypold wrote: > >> "Dmitry A. Kazakov" writes: >> >>> Consider also this: >>> >>> protected type Bar is >>> function Make_a_Mess return ...; >>> private >>> Baz : Integer; >>> -- To be put into the closure together with barriers of the entries! >>> >>> how do you return a closure from a protected object or a task rendezvous? >>> Will it be able to assign Baz? >> >> Interesting thought. Either it must inherit the barriers, somehow, or >> you simply can't. > > But proposing upward closures you have to be prepared to answer such > questions... Since I'm not on the standard commitee and neither get paid for it I can afford such sloppiness. But just to set the record straight: I've been talking about the general usefulness of closures (in languages) in the context of general considerations of what other languages have that might make the more popular than our beloved Ada, than about the definition of closure (after your slip up concerning "but this makes it global" this was necessary). I've never tried to suggest that it would be easy to fit closures back into Ada, nor did I suggest to do so in the short term. After all, the next standard probably doesn't happen until 2020 or so ... :-). >> I >> still do not see, how you would manage to pass procedure upwards which >> us variables that are defined in their environment. > > As I said before, I don't want this feature in Ada, it is your wish, not It was your suggestion that the code you proposed was some substitute for closures. > mine. > For all I don't know what is "environment." Exactly. > It is up to you to define it, before it could be reasonably > discussed. Further I don't see why environment cannot be expressed > as an object of manifested type (=OO solution) and why it should be > passed outwards. Well, you see, we (that is: you, in this case :-) are missing some groundwork on programming langauge design and implementation. So necessarily we talk on cross purposes (closures cannot be grasped in Ada terms). And I don't want to start a beginner's tutorial on FP here on c.l.a. of all things. So'll have to leave it at that, but -- as always I'm available to targeted questions. Regards -- Markus