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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,52fd60a337c05842 X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 2002-06-16 03:44:22 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!headwall.stanford.edu!fu-berlin.de!uni-berlin.de!dialin-145-254-043-056.arcor-ip.NET!not-for-mail From: Dmitry A.Kazakov Newsgroups: comp.lang.ada Subject: Re: ada paper critic Date: Mon, 17 Jun 2002 00:49:38 +0200 Message-ID: References: <8avjgu8bnkifee01ffu5i4h247n3khl7ub@4ax.com> <3D0A075F.482703FE@san.rr.com> Reply-To: mailbox@dmitry-kazakov.de NNTP-Posting-Host: dialin-145-254-043-056.arcor-ip.net (145.254.43.56) Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7Bit X-Trace: fu-berlin.de 1024224261 7385893 145.254.43.56 (16 [77047]) User-Agent: KNode/0.4 Xref: archiver1.google.com comp.lang.ada:26073 Date: 2002-06-17T00:49:38+02:00 List-Id: Darren New wrote: > "Dmitry A. Kazakov" wrote: >> Actually I meant Ada's protected objects and not the visibility rules. >> There is a great need to have protected objects extensible (tagged). >> At the same time it is not very clear (at least to me), how to do it. > > What's wrong with Java's approach to OO threading and protected objects? I do not know Java good enough to judge. But the problems as I see them are mostly with MD and MI. Java has no MD. Ada has neigher. But if it had, how to call on an entry point that belongs to two protected objects, or else tasks? Consider imaginary: task type A; task type B; entry Do_It (First : in out A; Second : in out B); -- Of both A and B task type C is new A with ...; entry Do_It (First : in out C; Second : in out B); -- Overrides in A X : A'Class := ...; Y : B'Class := ...; begin select Do_It (X, Y); -- Dispatching entry call ... What about freezing rules with MD? May I override barriers? How to override the body an entry point of a task? How to inherit an entry point? How to add a new entry point? From a caller view point, there is no difference between entry points of tasks and protected objects, should then exist a common parent type for them? Should caller know any difference between an entry point and a subroutine? Isn't that an implementation detail? If so, how to [efficiently] implement entry points with a return parameter? Or should we introduce generic formal entry points, protected type, task type parameters? I suspect lots of pitfalls here. However, ask more knowledgeable people than me ... -- Regards, Dmitry Kazakov www.dmitry-kazakov.de