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.8 required=5.0 tests=BAYES_00,INVALID_DATE autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 109fba,66253344eaef63db X-Google-Attributes: gid109fba,public X-Google-Thread: 103376,66253344eaef63db X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,66253344eaef63db X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 1994-09-30 10:41:32 PST Newsgroups: comp.lang.ada,comp.object,comp.lang.c++ Path: bga.com!news.sprintlink.net!redstone.interpath.net!ddsw1!news.kei.com!MathWorks.Com!noc.near.net!inmet!dsd!stt From: stt@dsd.camb.inmet.com (Tucker Taft) Subject: Re: Mut. Recurs. in Ada9X w/o Breaking Encaps.? (LONG) Message-ID: Keywords: Ada 9X, C++, object-oriented, Law of Demeter Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <1994Sep27.165203.9192@swlvx2.msd.ray.com> <1994Sep29.014611.20263@swlvx2.msd.ray.com> <1994Sep29.183749.7489@swlvx2.msd.ray.com> Date: Fri, 30 Sep 1994 01:47:16 GMT Xref: bga.com comp.lang.ada:6336 comp.object:6923 comp.lang.c++:31101 Date: 1994-09-30T01:47:16+00:00 List-Id: In article <1994Sep29.183749.7489@swlvx2.msd.ray.com>, John Volan wrote: >STT> if Y = null or else Y.all in T1'Class then ... >STT> -- Checks that PT1(Y) will succeed, before >STT> -- attempting it. >STT> > >Er, I think you meant: > > if Y /= null and then Y.all in T1'Class then ... > >Or maybe, if you wanted to cover the contrary case first: > > if Y = null or else Y.all not in T1'Class then ... No, actally I meant what I wrote ;-). If Y = null, then the conversion always succeeds, since all (named) access (sub)types include null as a legal value of the (sub)type. >I am an unabashed fanatic of the 1 Package = 1 Type = 1 Class approach, and >making that approach workable was the whole point of this thread. I'm not. In my view packaging is an additional dimension of flexibility that should be used (but not abused ;-). Packages are for grouping logically related entities, and it is fine if a single package includes two closely linked types. But I understand some of the advantages of the other approach as well... Vive la difference (but not on *my* project ;-). >-- John Volan >-- Company => "Raytheon Missile Systems Division", >-- E_Mail_Address => "jgv@swl.msd.ray.com", -Tucker Taft stt@inmet.com Intermetrics, Inc.