comp.lang.ada
 help / color / mirror / Atom feed
From: falis@ma.aonix.com (Ed Falis)
Subject: Re: What's class?
Date: 1999/02/24
Date: 1999-02-24T00:00:00+00:00	[thread overview]
Message-ID: <1103_919865565@DZOG-CHEN> (raw)
In-Reply-To: 7avvpf$pfl@drn.newsguy.com

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?
> 
> Bill.

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.

The classwide operation could in many cases be implemented in terms of other dispatching operations specific to the descendants.  Or, if you intend the descendants 
to provide their own implementations of the function in all cases, use the specific argument and declare the function as abstract.

- Ed





  reply	other threads:[~1999-02-24  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     ` Ed Falis [this message]
1999-02-25  0:00       ` dennison
1999-02-24  0:00     ` Jean-Pierre Rosen
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