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,1e36228aae0595da X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newshub.sdsu.edu!newsfeed.straub-nv.de!nuzba.szn.dk!news.jacob-sparre.dk!pnx.dk!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Access to function returning class-wide type Date: Thu, 21 Aug 2008 23:53:10 -0500 Organization: Jacob's private Usenet server Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: jacob-sparre.dk 1219380816 5260 69.95.181.76 (22 Aug 2008 04:53:36 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 22 Aug 2008 04:53:36 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5512 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.5512 Xref: g2news1.google.com comp.lang.ada:1750 Date: 2008-08-21T23:53:10-05:00 List-Id: "Dmitry A. Kazakov" wrote in message news:tslrrr8w3j63.zp28ykzgmr23.dlg@40tude.net... ... > P.S. I don't know reasons why it was decided to use an access type in > Ada.Tags.Generic_Dispatching_Constructor profile. One could always pass a > pointer there if a side effect on the parameters were desired. But that is > another issue, and in any case Proc is thought as an implementation > detail, > so its exact profile should not really matter. I originally came up with this proposal (based on random thoughts tossed out by Steve Baird and Tucker Taft). We'd been trying to find solutions for literally years; I was amazed that this one didn't fall into a heap of slag as the others had. Anyway, the access parameter exists so that an instance of this routine matches the profile of S'Class'Input. After all, the purpose of this routine is to eliminate the Ada 95 compiler magic involved with S'Class'Input and make it user-programmable. The thought is that a user-defined version of S'Class'Input would be directly specified as an instance of Generic_Dispatching_Constructor. In hindsight, I'm not certain that is a good idea, because it mucks up the spec for no particularly good reason. But that's the way it is now. Randy.