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.9 required=5.0 tests=BAYES_00 autolearn=ham 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.223.40 with SMTP id qr8mr5015301pbc.0.1336617219780; Wed, 09 May 2012 19:33:39 -0700 (PDT) MIME-Version: 1.0 Path: pr3ni8328pbb.0!nntp.google.com!news2.google.com!volia.net!news2.volia.net!feed-A.news.volia.net!news.ecp.fr!news.jacob-sparre.dk!munin.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: fyi, very interesting Ada paper OOP vs. Readability Date: Wed, 9 May 2012 21:33:18 -0500 Organization: Jacob Sparre Andersen Research & Innovation Message-ID: References: NNTP-Posting-Host: static-69-95-181-76.mad.choiceone.net X-Trace: munin.nbi.dk 1336617211 12422 69.95.181.76 (10 May 2012 02:33:31 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Thu, 10 May 2012 02:33:31 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Response X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Date: 2012-05-09T21:33:18-05:00 List-Id: "Nasser M. Abbasi" wrote in message news:jodq5f$j5f$1@speranza.aioe.org... ... > There are always tradeoffs in language design. Ada's > expressed design goal, of emphasizing ease of reading and > understanding over ease of writing, means such tradeoffs > should be decided in favor of ease of reading against ease > of writing, This was clearly not done in the case of inheritance. > > The goals of inheritance and dispatching, and so of OOP, > conflict with Ada's expressed design goals" The problem with this conclusion, of course, is that inheritance in Ada long predates OOP in Ada (Ada derived types have always had inheritance, even in Ada 80). So clearly the most original of Ada's designers disagree with this conclusion. I suspect the problem is that the contention that inheritance reduces readability is contentious. It's in the same category as use clauses and generic instantiation, both of which are original Ada 83 features that make declarations appear without appearing in the source code. You can make an argument that all of these things harm readability, but it is obvious that they all were considered important enough for the usability of the language to go in anyway. I can imagine a language that offered none of these things (inheritance, use clauses, generic instantiation), but it's unclear that the result would be particularly usable, and whether the extra declarations needed really would help readability. (There is an argument that brevity also helps readability, after all, and a language with more text is not necessarily more readable.) I tend to lean toward the explicit side of the fence (I try to avoid use clauses because of the maintenance headaches that they cause), but I do know that code can be too explicit. People hate it when I write: if Ada.Strings.Unbounded."="(My_String, Ada.Strings.Unbounded.To_Unbounded_String ("open") then ... because I refuse to use use clauses in almost all instances. I surely can see why they might not find the above as readable as: if My_String = "open" then ... Randy.