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,73036d0217be91e2 X-Google-Attributes: gid103376,public From: Lionel Draghi Subject: Re: Inheritance versus Generics Date: 1997/04/25 Message-ID: <3360066D.CAE@filnet.fr>#1/1 X-Deja-AN: 237297735 References: <33601924.774@flash.net> To: cdsmith0@flash.net Newsgroups: comp.lang.ada Date: 1997-04-25T00:00:00+00:00 List-Id: Craig Smith wrote: > > Generics were a very power feature of Ada-83. With the OO features > introduced into Ada-95 (in particuliar, the tagged record and ability to > inherit), are Generics obsolute? ... Clearly not, generics are even used by Ada 95 to provide certain kind of inheritance :-) I think this is a design issue : Inheritance and genericity have different use, and this justify existence of both : - when you need to factorize common "properties" between related object, you should use inheritance, and build classes. - when you need to factorize some algorythm between object possibly without any relation, you should use genericity. Inheritance imply the "is a kind of" relation, Genericity do not. D'accord ou pas? :-) ________________________________________________________________________________ Lionel Draghi 01 45 28 88 50 17, rue Simon Dereure 93 110 Rosny-sous-Bois France http://ada.eu.org/ http://www.adahome.com/