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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b307bd75c8071241 X-Google-Attributes: gid103376,public From: "John G. Volan" Subject: Re: Dynamic binding of packages Date: 1997/05/08 Message-ID: <33727F3E.70C7@sprintmail.com>#1/1 X-Deja-AN: 240324914 References: <5k5hif$7r5@bcrkh13.bnr.ca> <336A065B.41C6@magellan.bgm.link.com> <336E15A4.167E@magellan.bgm.link.com> <5knhge$mul@top.mitre.org> <336FDF8B.73AF@sprintmail.com> <01bc5bf3$675f2340$LocalHost@xhv46.dial.pipex.com> Reply-To: johnvolan@sprintmail.com Newsgroups: comp.lang.ada Date: 1997-05-08T00:00:00+00:00 List-Id: Nick Roberts wrote: > > However - and I am going to ask you to trust me on this (unless you really > want me post a truly humungous example ;-) - for certain real-life > situations, it is just too clumsy, because the binding - the connection > between interface and implementation - is centred around a type rather than > a package. I suppose I can understand this in principle, but you and Michael Brenner have piqued my curiosity. I'd really like to see a practical example, humungous or not (or at least a representative strawman, if you're sensitive about intellectual property). As you can probably tell, I am not hesitant when it comes to humungous examples... :-) Take this off-line and e-mail me if you must, although I think it still might be instructive for others on c.l.a. > This type-centred abstraction means that all abstract elements of the > interface has to be in terms of subprograms with that type as its parameter > (or one of its parameters). So, one loses the direct use of all the many > other language elements Ada allows in a package specification. This is not > a fundamental problem, it is just a problem of convenience. But, the > inconvenience is sometimes so great as to constitute a barrier. This is interesting. You may have something here (then again, you might not). I'm not sure I grasp what "other language elements" you're trying to tie into, or how. Exceptions? Generics? Are you trying to take static meta-data normally compiled away under the Ada model and make it available to be dynamically manipulated at run-time? Might be interesting to see exatly what you have in mind ... and you might yet be persuaded that the language can already do it, and it's really just a matter of choosing the right design pattern ... > So, I would still argue that (perhaps in a future revision) the Ada > language needs a standard mechanism for the dynamic binding of packages. Or it could just be a compiler-implementation choice already allowed by the current language specification, but not yet explored by (most) current compiler vendors. (Once again, note the case of Ada95=>JVM compilers and the dynamic loading of *.class files into a JVM applet.) But it's hard to judge this without ... (drum roll) ... a specific example! (ba-dump-dump) :-) ------------------------------------------------------------------------ Internet.Usenet.Put_Signature (Name => "John G. Volan", Home_Email => "johnvolan@sprintmail.com", Slogan => "Ada95: The World's *FIRST* International-Standard OOPL", Disclaimer => "These opinions were never defined, so using them " & "would be erroneous...or is that just nondeterministic now? :-) "); ------------------------------------------------------------------------