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,e8023133274ae02c X-Google-Attributes: gid103376,public X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news3.google.com!news.glorb.com!newsfeed-east.nntpserver.com!nntpserver.com!statler.nntpserver.com!newsfeed.arcor.de!news.arcor.de!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: procedural vs object oriented Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.14.1 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 8bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <1146039364.130635.181590@v46g2000cwv.googlegroups.com> <871wvjh9te.fsf@ludovic-brenta.org> <1xs8jrwjj0dx2$.1ksjkyqyhimw9$.dlg@40tude.net> <1146134530.434869.47230@t31g2000cwb.googlegroups.com> <16tpmi2zjzfmv.x68lm40hqvl8$.dlg@40tude.net> <3siq2e.3fk.ln@hunter.axlog.fr> Date: Fri, 28 Apr 2006 09:46:22 +0200 Message-ID: <6hbsa2y01esi.1hom0owrsl51u.dlg@40tude.net> NNTP-Posting-Date: 28 Apr 2006 09:46:22 MEST NNTP-Posting-Host: ca24cd29.newsread4.arcor-online.net X-Trace: DXC=@MOQQ\_8gZZD__2dTlB=E[:ejgIfPPldTjW\KbG]kaMX]kI_X=5KeaV5g6MQI1NOn\[6LHn;2LCV^7enW;^6ZC`TIXm65S@:3>_ X-Complaints-To: usenet-abuse@arcor.de Xref: g2news2.google.com comp.lang.ada:3976 Date: 2006-04-28T09:46:22+02:00 List-Id: On Thu, 27 Apr 2006 16:01:41 +0200, Jean-Pierre Rosen wrote: > Dmitry A. Kazakov a �crit : >> Well, no: >> >> if Read (File) then >> Foo; >> else >> Bar; >> end if; >> >> The uncertainty of a dispatching call is one of the context, exactly as in >> the example above. Provided, that there is nothing uncertain in how >> dispatching works or what potential targets do. >> > Of course, you can assume that every dispatching call is equivalent to a > case statement over all possibly redefined primitives. That works well > for one level. > > But if you consider that each called primitive may in turn redispatch > internally, you end up with a combinatorial explosion. Ah, but redispatch is luckily not allowed in Ada. The programmer has to explicitly convert the type to the class. That should not slip through peer review. [ I would even disallow it altogether. There is your trick for such things.] > In theory, yes, the analysis can be performed. In practice, no. Yes, but it is a sort of "postmortem" or C-ish approach. There is nothing fundamentally evil in dispatching if LSP problematic is supported. It is a question of the language and tools. Something like SPARK could change it. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de