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: a07f3367d7,29d8139471e3f53e X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII Path: g2news2.google.com!news4.google.com!feeder3.cambriumusenet.nl!feed.tweaknews.nl!193.141.40.65.MISMATCH!npeer.de.kpn-eurorings.net!npeer-ng0.de.kpn-eurorings.net!newsfeed.straub-nv.de!uucp.gnuu.de!newsfeed.arcor.de!newsspool3.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Preventing type extensions Newsgroups: comp.lang.ada User-Agent: 40tude_Dialog/2.0.15.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: <87iq2bfenl.fsf@mid.deneb.enyo.de> <81799aab-a2e8-4390-8f42-abceaa5fc032@m1g2000vbh.googlegroups.com> <5c0d7798-ba09-4bd0-a28f-f1b028cce927@y3g2000vbm.googlegroups.com> <9df21c09-f611-4088-811c-c092452adffc@e20g2000vbn.googlegroups.com> <37ae2382-9f7d-4790-be5f-e380b9220d75@s19g2000vbr.googlegroups.com> <170a6a4f-d441-4f86-8fbf-8f15da34a094@26g2000yqv.googlegroups.com> Date: Wed, 13 Oct 2010 20:50:15 +0200 Message-ID: NNTP-Posting-Date: 13 Oct 2010 20:50:13 CEST NNTP-Posting-Host: 4e0359cd.newsspool2.arcor-online.net X-Trace: DXC=P^P]\fjVZ1GAa;:RKVJ>LEA9EHlD;3YcB4Fo<]lROoRA8kF On Wed, 13 Oct 2010 10:37:28 -0700 (PDT), Cyrille wrote: > On Oct 13, 11:06�am, "J-P. Rosen" wrote: >> >> Of course, I don't mind if what is doable in Ada is also possible in >> other languages. The question is that class-wide programming is a >> first-class citizen in Ada, and I think that feature can be used in ways >> that can make HR systems easier to certify. > > easier than what? As far as I know, what you call class-wide > programming is a first-class citizen in all OO languages. It is just > part of the OO game I think it is oversimplified, almost untrue. 1. Class-wide operations are not supported for hidden arguments. In the main-stream C++/Java style OOP only these considered "true OO", others are out of scope: "parameters", "attributes", not from the class, not objects. A method always dispatches in the hidden argument (and re-dispatches later). It is nether fully primitive nor fully class-wide, it is messy. As such it by no means a good support for class-wide programming. And the class-wide programming is a clear second class-citizen because no class-wide operation can be declared *within* the class. 2. Class-wide programming is non-existent as a concept in the main-stream OOP. I never saw in OO literature class-wide programming described as a concept. There is generic programming, which BTW by many is considered as non-OO. Although the class-wide programming is an instance of generic programming, understood as programming in terms of sets of types, only its static vein i.e. templates is considered in OOP, if at all. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de