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=-1.9 required=5.0 tests=BAYES_00 autolearn=unavailable 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!news.swapon.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Niklas Holsti Newsgroups: comp.lang.ada Subject: Re: operation can be dispatching in only one type Date: Tue, 24 Nov 2015 22:25:39 +0200 Organization: Tidorum Ltd Message-ID: References: <04eb6626-644b-4b16-a329-c35659a9fbe2@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-Trace: individual.net xuKn++ydyAJy9EzZs3EALw+HEkZpwTbg4weEQpDQYuuXJ7m5kF Cancel-Lock: sha1:0AzprfEsT/KP5PtmsC7UIE05dV8= User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.8; rv:38.0) Gecko/20100101 Thunderbird/38.3.0 In-Reply-To: Xref: news.eternal-september.org comp.lang.ada:28528 Date: 2015-11-24T22:25:39+02:00 List-Id: On 15-11-24 19:09 , Jeffrey R. Carter wrote: > Note that the Ada construct that most closely matches a "class" is a protected type. Huh? What have mutual exclusion and interrupt-handling to do with "class"? Ok, some languages have "synchronized" classes, mixing the two concepts. Perhaps you mean that there is a syntactic resemblance, in that the operations and data of a protected type are indeed enclosed in dedicated "is" .. "end" brackets? > The only thing you *need* tagged types for in Ada is finalization. Tagged types and finalization are never "needed" in the Turing sense :-) I find that tagged types are a huge help in decoupling dependencies between packages. The root type (and 'Class type) can often have many fewer dependencies than the child types, greatly helping to localize cross-package dependencies. YMMV of course. -- Niklas Holsti Tidorum Ltd niklas holsti tidorum fi . @ .