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.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,4f071b0868ee342f X-Google-Attributes: gid103376,public From: Brian Rogoff Subject: Re: Design Question: How Best To Structure Cross-Referencing Types In Ada 95 Date: 1999/01/21 Message-ID: #1/1 X-Deja-AN: 435460618 References: <36A68FCA.E1EEAFFE@hiwaay.net> <787fku$k4m$1@nnrp1.dejanews.com> Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: nntp1.ba.best.com 916971233 16682 bpr@206.184.139.136 MIME-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-01-21T00:00:00+00:00 List-Id: On Thu, 21 Jan 1999 dewar@gnat.com wrote: > In article aeg@hiwaay.net, glover@thaad.tecmasters.com wrote: > > > > ... Ada withing problem description snipped ... > > Is there a neat Ada95 way of getting around this > > cross-referencing problem? > > This is an old and well discussed problem. Often you can > introduce a third package with the types alone to at least > factor this out, but the fundamental circularity problem > remains and there is no solution in pure Ada 95. > > For JGNAT, the version of GNAT that generates code for the > JVM, we have found it important to deal with this problem > for the purpose of translating existing Java specs. We have > therefore implemented an extension, based on Tucker's "with > type" suggestion the last time around this was discussed, > and this extension will be available (controlled by a > switch of course) in version 3.12 of GNAT. Is your extension going to use the same syntax as Tucker's proposal? Matthew Heaney raised the objection that the syntax was a bit ugly, since "with type" : "use type" is not the same relationship as "with" : "use" (am I paraphrasing your objection correctly Matthew?) and so a better syntax should be designed. I kind of agree, but I think the problem is more with "use type", which I don't like. Maybe next we'll see the signature extension from GNU-C++ on GNAT so that we can write Java interface style code directly ;-). > There are not many places where one can justify out and out > extensions of the language (and indeed I suppose one could > do this with a pragma, but it seems silly). This however, > seems an exception, where an extension is really needed. I thought ACT had a pragma for this; I recall reading about it from ACT-Europe. -- Brian