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,dea2d62ab1462538 X-Google-Attributes: gida07f3367d7,public,usenet X-Google-NewGroupId: yes X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news3.google.com!feeder.news-service.com!newsfeed.freenet.de!news.teledata-fn.de!newsfeed.arcor.de!newsspool4.arcor-online.net!news.arcor.de.POSTED!not-for-mail From: "Dmitry A. Kazakov" Subject: Re: Writing an Operating System in Ada 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: <8e9bc311-7540-40a1-b19e-49e93648c25c@s31g2000yqs.googlegroups.com> <9oyblld05omh$.1dzhmyoseeb7x$.dlg@40tude.net> <414945fd-8ed5-4f42-a237-0685602332b3@f5g2000yqh.googlegroups.com> <1c1x49re1atv3$.kxickttntzsn$.dlg@40tude.net> <26325363-b456-4c8f-a51d-4e87ef789619@a15g2000yqm.googlegroups.com> <754366b4-08c9-400b-b883-183e71dddd0b@35g2000yqa.googlegroups.com> <1fhgwtz4ezt52.zvep41elk4lq.dlg@40tude.net> Date: Fri, 15 Jan 2010 09:59:20 +0100 Message-ID: <5ea5ofafhgop.10x90gxu3ocv$.dlg@40tude.net> NNTP-Posting-Date: 15 Jan 2010 09:59:20 CET NNTP-Posting-Host: 00aac142.newsspool2.arcor-online.net X-Trace: DXC=L_I2;mFDW]4lIh70@7enW;^6ZC`4IXm65S@:3>?h1[8dXmEF`5 X-Complaints-To: usenet-abuse@arcor.de Xref: g2news1.google.com comp.lang.ada:8764 Date: 2010-01-15T09:59:20+01:00 List-Id: On Thu, 14 Jan 2010 19:24:41 -0600, Randy Brukardt wrote: > "Dmitry A. Kazakov" wrote in message > news:1fhgwtz4ezt52.zvep41elk4lq.dlg@40tude.net... >> On Thu, 14 Jan 2010 13:07:08 -0800 (PST), Shark8 wrote: > ... >>>> You have to be able to derive from a task, that is what active objects are. >>>> BTW, you already can do this in Ada 2005. It has task interfaces, but this >>>> inheritance is limited to have the depth of 1. >>> >>> I remember reading that now... but is an inheritance level of 1 good >>> enough? >> >> No, it is not. The bottom level is an interface, a quite useless thing >> because it does not provide implementation. The next level is a concrete >> implementation. The train stops there. > > You're confusing inheritance of interfaces with inheritance of > implementation. One of the most important parts of Ada is that it tries to > strongly separate interfaces and implementation. [I know you know this > difference, but are purposely ignoring it.] I don't ignore it, I point out that interface inheritance requires no interfaces (nor even abstract types). There is no problem to inherit the interface of a concrete type. Concerning separation of interface and implementation, I think that Ada 2005 interfaces in fact deviate from the model existing since Ada 83. In Ada 83-95 the separation was never based on types. The separation then was carried by packages. The programmer could choose between moving parts of the implementation into private parts or else into the body. Incomplete type declaration was the interface. It was simple, understandable, required no extra up front work. Compared to this interfaces are complex, verbose and superfluous. Yet they cannot replace the old model anyway, because there are things like constants and bodies which are not types, yet have implementations to separate. > Ada doesn't allow inheritance of implementation for synchronized objects, > for the very good reason that no one knows how to make inheritance rules > that doesn't violate the exclusion and ordering rules. We tried for a quite > a while to make a version of inheritable protected types, but it always led > to deadlocks, race conditions, or loss of exclusion. (Java has this problem > in spades.) Nobody says it will be simple... -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de