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=0.2 required=5.0 tests=BAYES_00,INVALID_MSGID, REPLYTO_WITHOUT_TO_CC 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: Mats Weber Subject: Re: Inheritance versus Generics Date: 1997/04/25 Message-ID: <3360CA7A.2272@elca-matrix.ch>#1/1 X-Deja-AN: 237370626 References: <33601924.774@flash.net> Organization: ELCA Matrix SA Reply-To: Mats.Weber@elca-matrix.ch 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? I would guess since several features > were added to generics (like generic formal package parameters), the > answer is no. Does anyone have any thoughts on this? No, generics are by no means obsolete. The were also introduced into Modula-3, which already had inheritance, by people who like simple languages. You can simulate generics with inheritance (the technique is described in Meyer's "Object Oriented Software Construction" (very good book BTW)), but it is really just a simulation, not the real thing. You loose type checking among other things. Note that Eiffel also has generics.