From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,fa1a697e52242fbf X-Google-Attributes: gid103376,public From: dennison@telepath.com Subject: Re: What's class? Date: 1999/02/25 Message-ID: <7b3pc6$ug7$1@nnrp1.dejanews.com>#1/1 X-Deja-AN: 448317675 References: <7av8du$rjj$1@news.kornet.nm.kr> <7avvpf$pfl@drn.newsguy.com> <1103_919865565@DZOG-CHEN> X-Http-Proxy: 1.0 x3.dejanews.com:80 (Squid/1.1.22) for client 204.48.27.130 Organization: Deja News - The Leader in Internet Discussion X-Article-Creation-Date: Thu Feb 25 15:14:25 1999 GMT Newsgroups: comp.lang.ada X-Http-User-Agent: Mozilla/4.5 [en] (WinNT; I) Date: 1999-02-25T00:00:00+00:00 List-Id: In article <1103_919865565@DZOG-CHEN>, falis@ma.aonix.com (Ed Falis) wrote: > On 23 Feb 1999 20:39:11 -0800, bill 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