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,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,73175d2d01a1b1dd X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,UTF8 Received: by 10.68.8.135 with SMTP id r7mr3749615pba.8.1317684640623; Mon, 03 Oct 2011 16:30:40 -0700 (PDT) Path: lh7ni10888pbb.0!nntp.google.com!news1.google.com!goblin2!goblin.stu.neva.ru!aioe.org!.POSTED!not-for-mail From: =?utf-8?Q?Yannick_Duch=C3=AAne_=28Hibou57?= =?utf-8?Q?=29?= Newsgroups: comp.lang.ada Subject: Re: subprogram must not be deeper than access type Date: Tue, 04 Oct 2011 01:30:38 +0200 Organization: Ada @ Home Message-ID: References: <20110925160442.399884a0@c-01b> NNTP-Posting-Host: Kti8eQLaPvHZUH9Tgegn6g.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Opera Mail/11.51 (Linux) X-Notice: Filtered by postfilter v. 0.8.2 Xref: news1.google.com comp.lang.ada:18281 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes Content-Transfer-Encoding: Quoted-Printable Date: 2011-10-04T01:30:38+02:00 List-Id: Le Sun, 25 Sep 2011 16:04:42 +0200, Oliver Kleinke = a =C3=A9crit: > Hi, > > I am unsure but you might want to try it using an anonymous access to > subprogram type, as described here > ('05 Rationale, 3.4 - Downward Closures) > http://www.adaic.org/resources/add_content/standards/05rat/html/Rat-3-= 4.html There are things I did not understand. > Ada 2005 overcomes the problem by introducing anonymous access to > subprogram types. This was actually considered during the design of > Ada 95 but it was not done at the time for two main reasons. Firstly, > the implementation problems for those who were using display vectors > rather than static links were considered a hurdle. Display vectors ? There is another reference below > that model does not work especially for display based implementations What is that display ? May be a matter of taste now > And secondly, a crafty technique was available using the newly > introduced tagged types. And of course one could continue to use > generics. But further thought showed that the implementation burden > was not so great provided the uses were kept simple =E2=80=94 and anyw= ay > nobody understood the tagged type technique which was reallyincredibly= = > contorted. I do prefer tagged types over access to subprogram, because I feel it is= = cleaner and more design evolution friendly (you may had anything useful = to = the tagged object, one of the most interesting, is a state). What is = contorted with tagged types here ? Why did he say nobody understood this= = technique ? -- = =E2=80=9CSyntactic sugar causes cancer of the semi-colons.=E2=80=9D [Ep= igrams on = Programming =E2=80=94 Alan J. =E2=80=94 P. Yale University] =E2=80=9CStructured Programming supports the law of the excluded muddle.= =E2=80=9D [Idem] Java: Write once, Never revisit