From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Date: 17 Aug 93 11:23:36 GMT From: agate!usenet.ins.cwru.edu!magnus.acs.ohio-state.edu!cis.ohio-state.edu!ne ws.sei.cmu.edu!ajpo.sei.cmu.edu!wellerd@ucbvax.Berkeley.EDU (David Weller) Subject: Re: Extending protected types in 9X. Message-ID: <1993Aug17.072336.21830@sei.cmu.edu> List-Id: In article woodward@cs.fit.edu (Bill Woodward) writes : > >I've found the following references from the Ada 9X AARM version 2.0 that >seem to preclude type extensions for protected types. > Oh, how I love a straight man :-) >[deletia] >Is this correct? and if so Why? (my personal quess is that it would be an >implementation headache to allow type extensions for protected types). > As Tucker may vouch, this is my favorite subject. Colin Atkinson and I have written a paper on this very subject. It will be published in the proceedings of Tri-Ada '93 (look for it in your local bookstores soon! NOT!). The Reader's Digest version is: No, protected types cannot be extended. Nor can tagged types become "protected". While it is true you may nest one kind of type within the record structure of the other, you fail to acquire the implicit benefits of that nested type. If you spend a little time on it, you can see that extending protected types (or protecting tagged types) can turn into a small concurrency nightmare. However, protected types were not really intended to be used in this manner (they were primarily intended for small, shared regions of memory that would be accessed by several tasks concurrently). We have proposed a syntax that will (ok, should) solve the problem of protecting extended types. We intend to tinker with the GNAT compiler to include this new syntax, flesh it out, then annoy people by banging our shoes on the table and insisting it be part of Ada 0X. It should be great fun. :-) Alas, our proposal, submitted a little under a year ago, was too late to be seriously considered for inclusion in the Ada 9X language. -- type My_Disclaimer is new Standard.Disclaimer with record AJPO, SEI : Cognizance := Disavow_All_Knowledge; end record;--)