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=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!news.eternal-september.org!feeder.eternal-september.org!news.glorb.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!buffer1.nntp.dca1.giganews.com!news.giganews.com.POSTED!not-for-mail NNTP-Posting-Date: Fri, 30 Jun 2017 08:54:37 -0500 Subject: Re: Ada wikibook help needed (O-O) Newsgroups: comp.lang.ada References: From: Norman Worth Date: Fri, 30 Jun 2017 07:54:37 -0600 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:49.0) Gecko/20100101 Firefox/49.0 SeaMonkey/2.46 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Message-ID: X-Usenet-Provider: http://www.giganews.com X-Trace: sv3-SijYyjASplXmMMVmrqt/DtZE1kIoqaLxezNWs7gc2ZiqmDwaMvEbEk3ruun3pTspvEqv9eNczqZ2+uX!Szzho8fwJ1rxpyf8R2wb114WzOn3h3By0p9HUr2obX16HZMchIUlwyVD0KfsvKwdqKPOT1NnVxPv X-Complaints-To: abuse@giganews.com X-DMCA-Notifications: http://www.giganews.com/info/dmca.html X-Abuse-and-DMCA-Info: Please be sure to forward a copy of ALL headers X-Abuse-and-DMCA-Info: Otherwise we will be unable to process your complaint properly X-Postfilter: 1.3.40 X-Original-Bytes: 3846 Xref: news.eternal-september.org comp.lang.ada:47226 Date: 2017-06-30T07:54:37-06:00 List-Id: G.B. wrote: > Hi all, > > for a number of years, the Wikibook subsection on O-O in Ada > seems to have suffered from lack of clarity, according to a number > of comments still present, a few written a number of years ago. > > Some here may say that this state of presentation is caused by > Ada using type extension and so forth in the first place. > But still, if the book does place Ada in contrast with C++, > say, or explains Ada O-O, then it should be possible to > precisely use Ada vocabulary to make readers profit by adding > unmistakable carity. > > https://en.wikibooks.org/wiki/Ada_Programming/Object_Orientation > > If you have a moment, could you kindly substantiate whether or not, > e.g., the following are absolutely and demonstrably correct and well put? > > > The page goes to some length to explain static dispatching > vs. dynamic dispatching, but fails to introduce "dispatching" > first, as a term, or to reference some suitable definition. > Then, > > "A conversion to the class-wide type makes [components] visible again." > > Is "visible" correct? > > > Is it correct to say “static call” at all, other than when waving hands, > (not helpfully IMHO) in > > "within Op1, the first call to Op2 is therefore also a static call " > > where > > procedure Op1 (This: Root) is > begin > ... > Op2 (This); -- not redispatching > ... > end Op1; > > The idea being that “static call” is not really defined in Ada AFAICT, > other than to mean a call of a static function in a static expression. > So, not the same thing as discussing O-O, or static binding, > or dynamic dispatch. > > > "In other OO languages, a method is either dispatching or not. > In Ada, a routine is either _available_ for dispatching or not. " > > The wording of LRM N(28) seems to not be in line with the second > of these statements. > > ... I agree; this section is very poorly written from top to bottom. Others have commented on Ada language technical problems with the article, but the worst problems stem from its English structure. Most textbooks do a far better job. We need to build the article from simple definitions and contexts through simple Ada constructs until we have explained the Ada philosophy for OOP and given adequate examples. It needn't be too complicated, but it should be complete. Here, even the definitions of OOP and OO design are unclear and do not follow the historical and common definitions. The section should be scrapped and rewritten, rather than revised. I would tackle it, but I don't feel sufficiently experienced in Ada OOP to do so.