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,MSGID_SHORT autolearn=no autolearn_force=no version=3.4.5-pre1 Date: 14 Jan 92 09:21:06 GMT From: mcsun!corton!enst!cyclope!rosen@uunet.uu.net (Jean-Pierre Rosen) Subject: Re: Multiple Inheritance in Ada 9X/Pointers? Message-ID: <1564@cyclope.enst.fr> List-Id: Two main usages of pointers in computer languages are: 1- to build dynamic structures. 2- to allocate structures whose precise size is not known at compilation time. In Ada, usage #2 tends to disappear thanks to unconstrained array types and discriminated records, since dynamically sized structures can now be allocated on the stack. Usage #1 of course still remains, but it is my *unmeasured* feeling that usage #2 was most often the reason for using pointers. You should therefore expect pointers to be much less frequent in Ada than in other languages. Of course, Ada lets you easily hide that a structure is implemented by pointers into the depth of a package body, provided you distinguish between Abstract data types with object semantics and those with value semantics. On the other hand, I can't imagine how you could effectively do that in C/C++: the ultimate representation "percolates" all the way to the end user. For example: can you imagine you can explain someone the behaviour of strings in C/C++ without mentionning that a string is nothing but a pointer to character?