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,887bac6875d2db34 X-Google-Attributes: gid103376,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!wns14feed!worldnet.att.net!attbi_s22.POSTED!53ab2750!not-for-mail From: "Jeffrey R. Carter" User-Agent: Thunderbird 2.0.0.9 (Windows/20071031) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Access idiom References: <6j5lj.309998$Fc.80333@attbi_s21> <26cde0d5-2c5e-4316-aad7-95fd7269646a@c23g2000hsa.googlegroups.com> In-Reply-To: <26cde0d5-2c5e-4316-aad7-95fd7269646a@c23g2000hsa.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Message-ID: NNTP-Posting-Host: 12.201.97.213 X-Complaints-To: abuse@mchsi.com X-Trace: attbi_s22 1201027660 12.201.97.213 (Tue, 22 Jan 2008 18:47:40 GMT) NNTP-Posting-Date: Tue, 22 Jan 2008 18:47:40 GMT Organization: AT&T ASP.att.net Date: Tue, 22 Jan 2008 18:47:41 GMT Xref: g2news1.google.com comp.lang.ada:19533 Date: 2008-01-22T18:47:41+00:00 List-Id: Gene wrote: > > Another, more succinct explanation... The graph has many node types, > all with common ancestor. Edges are pointers--named or anonymous > access Node_Type'Class; don't care which. Required is a primitive > "transform" procedure that dispatches on node type and must return a > pointer to an _arbitrary node type_ (i.e. again of type access > Node_Type'Class). Frequently the transform should just return its > parameter without modification. Using primitive functions (which > would enable return of anonymous access Node_Type'Class) is not good > due to need for multiple return values. In general, I would disagree. The visible part of the package specification presents the abstraction to the package client. The rest of the package is the implementation of that abstraction. The client should not need to know how you choose to implement the abstraction "Edge", and shouldn't have to take special action in his application code because you chose a specific implementation. -- Jeff Carter "Your mother was a hamster and your father smelt of elderberries." Monty Python & the Holy Grail 06