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-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,c7d1d12d1859ad7f X-Google-Attributes: gid103376,public X-Google-ArrivalTime: 1995-02-08 15:15:06 PST Path: swrinde!gatech!udel!news.mathworks.com!panix!cmcl2!thecourier.cims.nyu.edu!thecourier.cims.nyu.edu!nobody From: comar@cs.nyu.edu (Cyrille Comar) Newsgroups: comp.lang.ada Subject: Re: An Ada9X mimic of C++ friends? Date: 8 Feb 1995 11:27:55 -0500 Organization: Courant Institute of Mathematical Sciences Message-ID: <3hareb$nq5@lang8.cs.nyu.edu> References: <3h7u4p$8cp@bellboy.ucc.uconn.edu> NNTP-Posting-Host: lang8.cs.nyu.edu Date: 1995-02-08T11:27:55-05:00 List-Id: needham@newsserver.uconn.edu (Donald M Needham) writes: : Is there a construct in Ada9x that circumvents data abstraction : similar to a friend in C++? You can use the private part of a child unit (or a private child) to more or less simulate C++ friends. I say "more or less" because the "privacy" in C++ is an attribute of the Class where it is an attribute of the package in Ada and Ada package ARE NOT to be compared to C++ Classes. The right equivalent to C++ classes in Ada95 are private or record types (depending on what level of data abstraction you want). Those types being "tagged" if you expect to need run-time dispatching or type extension. -- ------------------------------------------------------------------------ Cyrille Comar, E-mail: comar@cs.nyu.edu Gnat Project US phone: (212) 998-3489