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 X-Google-Thread: 103376,fa1a697e52242fbf X-Google-Attributes: gid103376,public From: "Jean-Pierre Rosen" Subject: Re: What's class? Date: 1999/02/24 Message-ID: <7b1f5n$k5l$1@platane.wanadoo.fr>#1/1 X-Deja-AN: 447977310 Content-Transfer-Encoding: 8bit References: <7av8du$rjj$1@news.kornet.nm.kr> <7avvpf$pfl@drn.newsguy.com> Content-Type: text/plain; charset="iso-8859-1" X-MimeOLE: Produced By Microsoft MimeOLE V4.72.2120.0 Organization: Adalog Mime-Version: 1.0 Newsgroups: comp.lang.ada Date: 1999-02-24T00:00:00+00:00 List-Id: bill a �crit dans le message <7avvpf$pfl@drn.newsguy.com>... >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? There is a huge difference between a class-wide operation and an inherited operation. An inheritede operation conceptually is part of the definition of the type, and can be redefined by any descendant. In a sense, the original operation serves as a "default value" for descendants that don't care to redefine it. OTOH, a class wide operation operates conceptually on the full class; it is not part of the type definition, it is not inherited, and in cannot be redefined. The nice thing with inherited operations is that you can redefine them if you whish; the nice things with class-wide opertions is that you are certain that nobody redefined the operation behind your back to make it do something else. Given your constraints, choose the appropriate one... --------------------------------------------------------- J-P. Rosen (Rosen.Adalog@wanadoo.fr) Visit Adalog's web site at http://perso.wanadoo.fr/adalog