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.3 required=5.0 tests=BAYES_00, REPLYTO_WITHOUT_TO_CC autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,e276c1ed16429c03 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!news3.google.com!feeder.news-service.com!newsfeed.kamp.net!newsfeed0.kamp.net!news.qsc.de!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada is getting more popular! Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <8732ea65-1c69-4160-9792-698c5a2e8615@g13g2000yqj.googlegroups.com> <4cc60705$0$23764$14726298@news.sunsite.dk> <4cc6753c$0$23756$14726298@news.sunsite.dk> <4cc71e08$0$23758$14726298@news.sunsite.dk> <4cc87d7a$0$23755$14726298@news.sunsite.dk> <4cc912e1$0$23761$14726298@news.sunsite.dk> Date: Sun, 31 Oct 2010 11:54:22 +0100 Message-ID: <10g3vmx6lxyu.bjfg1i5gjcsf$.dlg@40tude.net> NNTP-Posting-Date: 31 Oct 2010 11:54:24 CET NNTP-Posting-Host: 51a87eaa.newsspool1.arcor-online.net X-Trace: DXC=_G`Zg19076ic==]BZ:af>4Fo<]lROoR1<`=YMgDjhg2E>BTRb^`4f;[6LHn;2LCV>[Mo;oN;R^Z=bofo?TdKCO4 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:16000 Date: 2010-10-31T11:54:24+01:00 List-Id: On Sun, 31 Oct 2010 11:38:02 +0100, J-P. Rosen wrote: > FWIW, here are my criteria for using inheritance: > 1) you have several types, that are too different to be modelled as > variations of a single type (use discriminated types otherwise); > 2) however, these types have some common logical properties, with > different implementations > 3) you have to maintain an heterogenous container of these various types > 4) you want to call the common operations on all objects in the container 5) you want to postpone some design decision/implementation to a later point. So you describe/implement what you know for certain right now, in the form of an abstract type, and let a derived type to define the rest when more information becomes available. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de