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,7dbba1cd16d32bb8 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news4.google.com!proxad.net!feeder1-2.proxad.net!62.111.101.3.MISMATCH!news.germany.com!storethat.news.telefonica.de!telefonica.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Ada OOP syntax Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.1 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Reply-To: mailbox@dmitry-kazakov.de Organization: cbb software GmbH References: <_9adnb1KYvIrW87VnZ2dnUVZ_vOdnZ2d@comcast.com> Date: Sat, 14 Jun 2008 17:31:55 +0200 Message-ID: <1tllou1y5txt2.1j3hh95i6b830.dlg@40tude.net> NNTP-Posting-Date: 14 Jun 2008 17:31:57 CEST NNTP-Posting-Host: 1b0c1414.newsspool1.arcor-online.net X-Trace: DXC=dJTiCe:m=>MI7\_^6>c20Jic==]BZ:afN4Fo<]lROoRA<`=YMgDjhgBb5FMY:UF6[G[6LHn;2LCVNCOgUkn_?_YO7f>oN05WnkL\2AZ0Ig7W]F X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:703 Date: 2008-06-14T17:31:57+02:00 List-Id: On Sat, 14 Jun 2008 06:26:03 -0700, Steve wrote: > Tagged type definitions, IMO are an abomination. If you look at Delphi (an > object oriented version of Pascal), or C++, C# or Java, there is no > ambiguity of the scope of the entities that belong to an object. Method is not an "entity" of an object. Note that the notation you are advocating for is plainly inconsistent. Observe that the relation between a method and *one* of the types of its arguments is just not 1-1. The most notorious example when it becomes essential is multiple dispatching operations. Operation Draw does not belong either to Device or to Glyph. 1-1 mapping is inconsistent with operations having more than one argument (including result). Thus any of the languages you have mention are not OOPLs, as they necessary have types not obeying OO. [...] > Don't try to respond by explaining how to deal with tagged type definitions > in Ada. Well, then let me explain you how to deal with OO! (:-)) > Perhaps the language could be enhanced to permit an alternate syntax that > clearly defines the scope of a class (or tagged type if anyone is stuck on a > name) and a pragma to only permit the alternate syntax added? It should do exactly the reverse. Ada made such mistakes before, see protected and task types. One consequence of these mistakes is that the *private* part of a publicly visible protected type appears in a *public* part of the package! This should be reversed in order treat all types equally in OO way. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de