From: Robert A Duff <bobduff@shell01.TheWorld.com>
Subject: Re: class wide object in generic package
Date: Thu, 13 Jun 2002 01:58:30 GMT
Date: 2002-06-13T01:58:30+00:00 [thread overview]
Message-ID: <wccelfcos6x.fsf@shell01.TheWorld.com> (raw)
In-Reply-To: ubsagmmfe.fsf@gsfc.nasa.gov
Stephen Leake <stephen.a.leake.1@gsfc.nasa.gov> writes:
> "Ehud Lamm" <mslamm@huji.ac.il> writes:
>
> > It seems to me you want as a generic paramter any type that has the Eval
> > operation.
> > So you can define a parent type having this operation (say an abstract type
> > called Evalable).
> > Now you can define the generic
> >
> > with Evalable_Pak;
> > generic
> > type My_Evalable is new Evalable_Pak.Evalable with private;
> > ....
> >
> > My_Evalable will have a primitive Eval operation.
>
> Yes, it will have an Eval operation, but that operation will _not_ be
> visible in the generic body.
That's not correct. My_Evaluable inherits a primitive Eval from
Evalable_Pak.Evalable, and this may be called in the generic body.
In the instance, it will call the Eval for the actual type.
>... The generic body does _not_ "read" the
> package spec for Evalable_Pak.
It does.
> That's why you need the generic formal package parameter; then the
> generic body _does_ see everything in the generic formal package spec.
That's another way of doing things.
- Bob
next prev parent reply other threads:[~2002-06-13 1:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-06-10 7:38 class wide object in generic package Thomas Maier-Komor
2002-06-10 12:28 ` Craig Carey
2002-06-10 13:14 ` Thomas Maier-Komor
2002-06-10 13:00 ` Stephen Leake
2002-06-10 13:25 ` Thomas Maier-Komor
2002-06-11 20:57 ` Ehud Lamm
2002-06-12 17:33 ` Stephen Leake
2002-06-13 1:58 ` Robert A Duff [this message]
2002-06-13 14:07 ` Stephen Leake
-- strict thread matches above, loose matches on Subject: below --
2002-06-10 11:07 Grein, Christoph
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox