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.1 required=5.0 tests=BAYES_00, PP_MIME_FAKE_ASCII_TEXT autolearn=no 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!nntp-feed.chiark.greenend.org.uk!ewrotcd!newsfeed.xs3.de!io.xs3.de!news.jacob-sparre.dk!franka.jacob-sparre.dk!pnx.dk!.POSTED!not-for-mail From: "Randy Brukardt" Newsgroups: comp.lang.ada Subject: Re: Ada Annoyances Date: Fri, 23 Jun 2017 12:41:49 -0500 Organization: JSA Research & Innovation Message-ID: References: <1ac5a44b-4423-443a-a7bb-2864d9abe78f@googlegroups.com> <1498048151.20885.28.camel@obry.net> <96174ea5-852d-44e9-8535-7c1eb24d5326@googlegroups.com> <8d3aff06-82df-485f-89e5-a50c326aab05@googlegroups.com> NNTP-Posting-Host: rrsoftware.com X-Trace: franka.jacob-sparre.dk 1498239710 23004 24.196.82.226 (23 Jun 2017 17:41:50 GMT) X-Complaints-To: news@jacob-sparre.dk NNTP-Posting-Date: Fri, 23 Jun 2017 17:41:50 +0000 (UTC) X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.5931 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.6157 Xref: news.eternal-september.org comp.lang.ada:47086 Date: 2017-06-23T12:41:49-05:00 List-Id: wrote in message news:8d3aff06-82df-485f-89e5-a50c326aab05@googlegroups.com... Le mercredi 21 juin 2017 18:12:53 UTC+2, Dmitry A. Kazakov a écrit : >... >It could very well be argued that the C++ choice is a lot better. Well, in the sense that you can argue anything. Some people argue the earth is flat, too. >Most of the time, you never want to call a possibly dispatching method in >without dispatching. This seems to be a viewpoint that comes from taking OOP religious dogma as some sort of fact. A much more sensible statement is that "most of the time, you want to call the correct subprogram body for your object". A sensible programmer will never care how that is determined or which mechanism is used to implement that. And the fact that a statically bound call is faster than a dynamically bound call suggests the former ought to be used. >Ada gives you a little bit more flexibility, at the cost of being much more >error prone, >because it's easy to make a non dispatching call instead of a dispatching >one. Not >a good point for Ada ! Yeah, it's terrible that Ada avoids errors and ignores dogma. A more sensible take on this is that it is insane to put the burden of what can be called with a dispatching call onto a library designer. The vast majority of routines in Claw have no (obvious) good reason to be called as dispatching calls. But I don't want to claim to know how every user of Claw might want to use it, so if Ada had followed the C++ rule, every routine would have had to be marked virtual, effectively making everything more expensive. Library designers are not omnipitent! Randy.