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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,8591be732d0fce98 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news1.google.com!news1.google.com!newsfeed2.dallas1.level3.net!news.level3.com!newsfeed-00.mathworks.com!nntp.TheWorld.com!not-for-mail From: Robert A Duff Newsgroups: comp.lang.ada Subject: Re: Ada OOP alternatives? Date: Wed, 16 Jul 2008 10:03:15 -0400 Organization: The World Public Access UNIX, Brookline, MA Message-ID: References: <462e0cf4-1d53-4918-b30b-dd3d8df90f1b@p25g2000hsf.googlegroups.com> <487d9636$0$6543$9b4e6d93@newsspool3.arcor-online.net> NNTP-Posting-Host: shell01.theworld.com Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: pcls6.std.com 1216216996 23889 192.74.137.71 (16 Jul 2008 14:03:16 GMT) X-Complaints-To: abuse@TheWorld.com NNTP-Posting-Date: Wed, 16 Jul 2008 14:03:16 +0000 (UTC) User-Agent: Gnus/5.1008 (Gnus v5.10.8) Emacs/21.3 (irix) Cancel-Lock: sha1:yo1dbvJ0PgIgMssDgUoGB0gosJY= Xref: g2news1.google.com comp.lang.ada:1175 Date: 2008-07-16T10:03:15-04:00 List-Id: Georg Bauhaus writes: > Meyer has collected a question about Ada's type syntax which > is, Why hasn't Ada used the same syntax for the pair (type, > operations) which is does use for (protected type, operations)? You want the operations of a private type to have visibility on the components of all visible objects of the type. E.g. P(X,Y) should be able to see the implementation details of X and Y (assuming P is in the package where the type is declared). You want the operations of a protected type to have visibility on the components of just that object (the one that was locked when entering the operation) -- not other objects that happen to be of the same type. - Bob