comp.lang.ada
 help / color / mirror / Atom feed
From: Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov>
Subject: Re: Abstract Functions
Date: 16 Jul 2001 17:51:32 -0400
Date: 2001-07-16T22:08:43+00:00	[thread overview]
Message-ID: <uitgso84b.fsf@gsfc.nasa.gov> (raw)
In-Reply-To: 9ihs6j$k33$1@nh.pace.co.uk

"Marin David Condic" <marin.condic.auntie.spam@pacemicro.com> 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



  parent reply	other threads:[~2001-07-16 21:51 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-11 14:24 Abstract Functions Marin David Condic
2001-07-11 15:22 ` Ted Dennison
2001-07-11 15:43   ` Marin David Condic
2001-07-11 16:35     ` Ehud Lamm
2001-07-11 17:08       ` Marin David Condic
2001-07-11 17:27     ` Ted Dennison
2001-07-16 21:43     ` Tucker Taft
2001-07-16 22:15       ` Marin David Condic
2001-07-16 21:51     ` Stephen Leake [this message]
  -- strict thread matches above, loose matches on Subject: below --
2001-07-11 14:49 Re[2]: " ANH_VO
2001-07-11 19:01 ` tmoran
2001-07-12 14:10   ` Marin David Condic
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox