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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b076e6315fd62dc5 X-Google-NewGroupId: yes X-Google-Attributes: gida07f3367d7,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Received: by 10.68.241.98 with SMTP id wh2mr4564658pbc.7.1336705297827; Thu, 10 May 2012 20:01:37 -0700 (PDT) Path: pr3ni12140pbb.0!nntp.google.com!news2.google.com!news.glorb.com!feeder.erje.net!news.mixmin.net!aioe.org!.POSTED!not-for-mail From: NatarovVI <4KCheshireCat@gmail.com> Newsgroups: comp.lang.ada Subject: Re: fyi, very interesting Ada paper OOP vs. Readability Date: Fri, 11 May 2012 03:01:35 +0000 (UTC) Organization: Aioe.org NNTP Server Message-ID: References: NNTP-Posting-Host: 2IEQ0u9w7c/jjzhI2FNAqw.user.speranza.aioe.org Mime-Version: 1.0 X-Complaints-To: abuse@aioe.org User-Agent: Pan/0.135 (Tomorrow I'll Wake Up and Scald Myself with Tea; GIT 30dc37b master) X-Notice: Filtered by postfilter v. 0.8.2 Content-Type: text/plain; charset=KOI8-R Content-Transfer-Encoding: 8bit Date: 2012-05-11T03:01:35+00:00 List-Id: > Inheritance gains us something- We had to write less code using > inheritance than we would have to write to implement these examples > using composition, so using inheritance makes code easier to write. The > price for this benefit is reduced readability. inheritance always was definetely WRONG idea. because inheritance purposely brokes incapsulation/modularity. you not "gain" some code "for free" (and never will). you just lose own control on modifications. contract parent-child is so undefined and unspecific, so one-sided... inheritance too tightly glues things, you can now reason about all parts only as "whole". you lost two independent replaceable modules, but get one complex artefact. that's impressive... but stupid. OOP and OOD is wrong idea. Only data abstraction and modularity (without inheritance and, maybe, polymorphism) is good.