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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,b18c1bcb7f0031e7 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2003-08-24 19:04:21 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!newshub.sdsu.edu!elnk-nf2-pas!newsfeed.earthlink.net!stamper.news.pas.earthlink.net!stamper.news.atl.earthlink.net!newsread2.news.atl.earthlink.net.POSTED!not-for-mail Sender: mheaney@MHEANEYX200 Newsgroups: comp.lang.ada Subject: Re: simulate inheritance with generic package References: From: Matthew Heaney Message-ID: X-Newsreader: Gnus v5.7/Emacs 20.7 Date: Mon, 25 Aug 2003 02:04:21 GMT NNTP-Posting-Host: 65.110.133.134 X-Complaints-To: abuse@earthlink.net X-Trace: newsread2.news.atl.earthlink.net 1061777061 65.110.133.134 (Sun, 24 Aug 2003 22:04:21 EDT) NNTP-Posting-Date: Sun, 24 Aug 2003 22:04:21 EDT Organization: EarthLink Inc. -- http://www.EarthLink.net Xref: archiver1.google.com comp.lang.ada:41831 Date: 2003-08-25T02:04:21+00:00 List-Id: WATANABE Katsuhiro writes: > I'd like to know how to simulate inheritance in OO with > generic package in classic Ada, which has no tagged type. Don't bother. The only reason you need inheritance is for dynamic binding, which you don't have anyway in Ada83. What is your interest in Ada83? Why can't you use Ada95? > As I am a Smalltalk programmer, I have limited knowledge > on Ada and its instanciation mechanism of generic package. > So, I'd appreciate your help showing concretely what > 'a specific routine' is. Perhaps he means "generic actual subprogram"? If all you want to do is reuse a subprogram, then you don't need inheritance. Simply provide the reuseable functionality in its own subprogram, and then call the subprogram. No inheritance is necessary. No generics either, for that matter.