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,4f788831da4de764 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2001-07-16 14:53:52 PST Path: archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!canoe.uoregon.edu!hammer.uoregon.edu!skates!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Abstract Functions Date: 16 Jul 2001 17:51:32 -0400 Organization: NASA Goddard Space Flight Center Message-ID: References: <9ihnia$i8h$1@nh.pace.co.uk> <6b_27.15423$Kf3.181711@www.newsranger.com> <9ihs6j$k33$1@nh.pace.co.uk> NNTP-Posting-Host: anarres.gsfc.nasa.gov Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: skates.gsfc.nasa.gov 995321323 12706 128.183.220.71 (16 Jul 2001 22:08:43 GMT) X-Complaints-To: dscoggin@cne-odin.gsfc.nasa.gov NNTP-Posting-Date: 16 Jul 2001 22:08:43 GMT User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.6 Xref: archiver1.google.com comp.lang.ada:10029 Date: 2001-07-16T22:08:43+00:00 List-Id: "Marin David Condic" writes: > That is one possible way to go. However, what I have is a working parent > type that does useful things in its own right. It would be useful to have a > way of keeping it executable, but adding one or more operations that would > require extension. What does that mean? How can it be both "executable" (presumably without declaring a derived type), and "require extension" (presumably by requiring a derived type). This seems inherently contradictory, which may be why you are having trouble doing it :). > Basically, if you have a type that is a few generations down the > inheritance tree and now want to add some abstract operations, the > only way to do that is make the whole tree of types abstract. I'd > prefer not to do that. Ok, make it generic. > Its the sort of thing where I've gone down a chain of inheritance > and said "O.K. Now I need the user to provide me with some functions > and I don't want to make this generic." Ok, use pointers to functions. > I suppose I could use pointers to functions but I've never liked > that answer. Ok, we've suggested all the Ada ways, and you've said "I don't wanna". Go use C++ :). Seriously, you need to give more detailed reasons why all these ideas are bad. -- -- Stephe