comp.lang.ada
 help / color / mirror / Atom feed
From: Matthew Heaney <matthewjheaney@earthlink.net>
Subject: Re: simulate inheritance with generic package
Date: Mon, 25 Aug 2003 02:04:21 GMT
Date: 2003-08-25T02:04:21+00:00	[thread overview]
Message-ID: <uad9yijaz.fsf@earthlink.net> (raw)
In-Reply-To: usmnqa5q4.fsf@katsu.watanabe.name

WATANABE Katsuhiro <katsu@watanabe.name> 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.



  reply	other threads:[~2003-08-25  2:04 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2003-08-25  1:25 simulate inheritance with generic package WATANABE Katsuhiro
2003-08-25  2:04 ` Matthew Heaney [this message]
2003-08-25 14:25 ` Robert C. Leif
replies disabled

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