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,LOTS_OF_MONEY autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!gandalf.srv.welterde.de!news.jacob-sparre.dk!loke.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: GNAT GPL is not shareware Date: Mon, 12 Jan 2015 17:49:21 -0600 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: <87bnmetex4.fsf@ludovic-brenta.org> <79f3eff7-2b45-40ae-af94-fa9a17426d82@googlegroups.com> <87bnmd8mg2.fsf@ixod.org> <19cf9bc2-f8b9-4735-b427-7b070dda59da@googlegroups.com> <1otenmcbgnvlt$.dn9361nl2jm8$.dlg@40tude.net> <8ryfky4awox2$.q2gfw4pvsgau.dlg@40tude.net> NNTP-Posting-Host: rrsoftware.com X-Trace: loke.gir.dk 1421106562 23221 24.196.82.226 (12 Jan 2015 23:49:22 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Mon, 12 Jan 2015 23:49:22 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 X-RFC2646: Format=Flowed; Response Xref: news.eternal-september.org comp.lang.ada:24555 Date: 2015-01-12T17:49:21-06:00 List-Id: "Shark8" wrote in message news:eFZrw.1020853$No4.1016889@fx19.iad... > On 09-Jan-15 15:03, Randy Brukardt wrote: >> And it probably would have problems >> with macro-expanded generics vs. code-shared generics (again, which ASIS >> has >> in spades) - either you duplicate the definitions, so you no longer have >> a >> 1-to-1 relation of identifiers to source, or you don't, and you have >> multiple versions of the same thing. > > I haven't read anything about the DIANA based systems having trouble with > generics/instantiations in my research. -- Do you have some experience or > stories about them? Could you elaborate on the problems of ASIS w/ > generics? DIANA certainly wouldn't have any issues, because any individual implementation simply does whatever it does, which is fine. The problem with ASIS is that is a disaster for portability. ASIS 99 essentially allows the implementation to do whatever it does for generics -- so how do you write portable code for that? (Ans: you have to write it both ways and use query functions. Gag.) The alternative is to require it to emulate a macro-expansion. But of course then an ASIS implementation is near impossible on a sharing implementation. (After all, if the implementer wanted to implement the full nastiness of a macro-expansion implementation, they probably would have done that in the first place. And they'll have to implement 95% of it in order to properly implement ASIS.) The other problem with ASIS is that the name "Ada Semantic Interface" is nearly a lie; ASIS has very little semantic information in it. It's almost exclusively about matching syntactic constructs with their syntactic definitions. It does badly with anonymous things for this reason (the worst being T'Class, which is 100% implicit), and it makes it very hard to deal with visibility and the like. It also means its a bad mapping for any implementation that does not keep the syntax around. For instance, in Janus/Ada, we eliminate most static matching issues by collapsing subtypes whenever possible. So there is never more than one subtype object with each static semantics, even if those come from different declarations. (If you can't tell the difference from the Ada perspective, why waste space on storage?) One can't implement ASIS that way; we'd have to change the underlying way subtypes are handled in order to separate the different declarations. A true semantic interface would talk about semantic entities only, the associated syntax would not enter into it. Randy.