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: 103376,93fa00d728cc528e X-Google-Attributes: gid103376,public X-Google-Thread: 1108a1,93fa00d728cc528e X-Google-Attributes: gid1108a1,public X-Google-ArrivalTime: 1994-10-27 08:43:46 PST Newsgroups: comp.lang.ada,comp.object Path: nntp.gmd.de!Germany.EU.net!news.dfn.de!xlink.net!howland.reston.ans.net!usc!elroy.jpl.nasa.gov!lll-winken.llnl.gov!noc.near.net!inmet!dsd!bobduff From: bobduff@dsd.camb.inmet.com (Bob Duff) Subject: Re: SOLVED! Decoupled Mutual Recursion Challenger Message-ID: Keywords: Ada9X, "withing" problem, CORBA, IDL Sender: news@inmet.camb.inmet.com Organization: Intermetrics, Inc. References: <1994Oct12.224944.25566@swlvx2.msd.ray.com> <1994Oct17.205244.17450@swlvx2.msd.ray.com> <1994Oct18.221751.15457@swlvx2.msd.ray.com> Date: Wed, 19 Oct 1994 01:01:45 GMT Xref: nntp.gmd.de comp.lang.ada:16234 comp.object:16675 Date: 1994-10-19T01:01:45+00:00 List-Id: In article <1994Oct18.221751.15457@swlvx2.msd.ray.com>, John Volan wrote: >However, making it this general was just a gratuitous freebie. I >threw it in because I couldn't see any reason not to -- but now I do >see the reason. At any rate, there is some room to back off: The >original intent was to be able to "opaquely" store pointers >designating what would (eventually) be tagged record types -- most >likely class-wide types, and most likely only *definite* tagged record >types. So it would not hurt things very much if wee restricted the >contract to only support pointers designating definite, class-wide >tagged record types: You probably have a higher probability of being portable to more compilers if you use general access types. Say "access all" instead of just "access". The reason is that the latter is pool-specific, and the compiler very well might take advantage of specific properties of that storage pool. If you use general access types (access all), then the compiler is less likely to play games on you. > type Pointer is access Object'Class; Better say: type Pointer is access all Object'Class; ^^^ >>Another implementation I've heard about (from Rational, I think?), >>creates a separate storage pool for every access type, and uses various >>virtual memory tricks to make that efficient. Access types end up being >>represented in various numbers of bits, I believe. > >So, depending on what pools the clients store their tagged types in, >even the above scheme might not turn out to be portable. If you use general access types, you will probably defeat such cleverness in the compiler. (No guarantees, though.) > generic > type Object (<>) is limited private; > package Address_To_Access_Conversion is > type Object_Pointer is access all Object; > ... > >In other words, this package provides a *new* access type into which >address values can be converted. It's *not* providing the capability >to convert some *arbitrary* access type into addresses. Explicit type conversions between general access types are allowed in certain circumstances. Check out the RM for details. >This is a bit of a restriction, but not too unreasonable. In fact, >there may be other reasons for introducing a root Universal class >anyway. Other object-oriented "infrastructures" often do something >similar. Yes. In Smalltalk and some other languages, there's a class that's the mother of all classes. - Bob -- Bob Duff bobduff@inmet.com Oak Tree Software, Inc. Ada 9X Mapping/Revision Team (Intermetrics, Inc.)