comp.lang.ada
 help / color / mirror / Atom feed
From: dennison@telepath.com
Subject: Re: What's class?
Date: 1999/02/25
Date: 1999-02-25T00:00:00+00:00	[thread overview]
Message-ID: <7b3pc6$ug7$1@nnrp1.dejanews.com> (raw)
In-Reply-To: 1103_919865565@DZOG-CHEN

In article <1103_919865565@DZOG-CHEN>,
  falis@ma.aonix.com (Ed Falis) wrote:
> On 23 Feb 1999 20:39:11 -0800, bill <bill@newsguy.com> wrote:
>
> >
> > Since any type that extends a parent type, also inherits its operations,
> > then in this case, writing
> >
> >          function is_full( stack: in bounded_stack'class)
> > and
> >          function is_full( stack: in bounded_stack)
> >
> >
> > make no difference!
> >
> > correct?
>
> The difference is if you plan to allow a change to the representation or
> implementation of bounded_stack in its descendants, and expect to implement
> the "stack full" operation in terms of one or more alternate representations
> in the is_full function.

There's also the minor difference that a user of a type extended from
bounded_stack will have to with bounded_stack's package as well as the new
type's package to get at the first definition. The second definition they get
straight from the new type's package.

Also, the first function can be written in any package at all (assuming you
don't need special visibility to write its body, while the second has to be
written in bounded_stack's package spec to be inherited.

T.E.D.

-----------== Posted via Deja News, The Discussion Network ==----------
http://www.dejanews.com/       Search, Read, Discuss, or Start Your Own    




  reply	other threads:[~1999-02-25  0:00 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-02-23  0:00 What's class? Rouault
1999-02-23  0:00 ` David Botton
1999-02-24  0:00 ` Matthew Heaney
1999-02-23  0:00   ` bill
1999-02-24  0:00     ` Jean-Pierre Rosen
1999-02-24  0:00     ` Ed Falis
1999-02-25  0:00       ` dennison [this message]
1999-02-25  0:00     ` Matthew Heaney
1999-02-25  0:00 ` Gyeongmoon Ryu
1999-02-24  0:00   ` Matthew Heaney
replies disabled

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