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 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!news.eternal-september.org!mx02.eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail From: "Dmitry A. Kazakov" Newsgroups: comp.lang.ada Subject: Re: operation can be dispatching in only one type Date: Wed, 25 Nov 2015 09:24:32 +0100 Organization: cbb software GmbH Message-ID: <1ephv5ugr5mib$.9ehadf3dddct$.dlg@40tude.net> References: <04eb6626-644b-4b16-a329-c35659a9fbe2@googlegroups.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: p9a8jKAGz0rpkSSbWxF1gQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org User-Agent: 40tude_Dialog/2.0.15.1 X-Notice: Filtered by postfilter v. 0.8.2 Xref: news.eternal-september.org comp.lang.ada:28534 Date: 2015-11-25T09:24:32+01:00 List-Id: On Tue, 24 Nov 2015 14:48:24 -0700, Jeffrey R. Carter wrote: > I mean that a protected type defines a set of values and operations on those > values, This is a type, not yet a class. BTW, it is not even a proper class-type (a root type in Ada terms) because you could not derive anything from it. > encapsulates the values and operations, and hides the implementation of > the values. In fact it does not hide the implementation of values. That is one of its design flaws. The implementation of protected components is mixed with the interface. It should have had public components with read access acting as a protected function and write access doing as a protected procedure. The private components should have been declared in the package's private section or the package body. -- Regards, Dmitry A. Kazakov http://www.dmitry-kazakov.de