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,b307bd75c8071241 X-Google-Attributes: gid103376,public From: "Nick Roberts" Subject: Re: Dynamic binding of packages Date: 1997/05/08 Message-ID: <01bc5bf3$675f2340$LocalHost@xhv46.dial.pipex.com>#1/1 X-Deja-AN: 240297005 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> Organization: UUNet PIPEX server (post doesn't reflect views of UUNet PIPEX) Newsgroups: comp.lang.ada Date: 1997-05-08T00:00:00+00:00 List-Id: John G. Volan wrote in article <336FDF8B.73AF@sprintmail.com> a lengthy example of using a tagged type to provide multiple implementations of a single interface. The use of tagged types ('classes' in C++ and most other languages) in this way is well known, and your example illustrates the principle nicely. In many situations, this approach works fine, and often has further advantages, too. 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. 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. So, I would still argue that (perhaps in a future revision) the Ada language needs a standard mechanism for the dynamic binding of packages. Nick.