comp.lang.ada
 help / color / mirror / Atom feed
From: comar@cs.nyu.edu (Cyrille Comar)
Subject: Re: An Ada9X mimic of C++ friends?
Date: 8 Feb 1995 11:27:55 -0500
Date: 1995-02-08T11:27:55-05:00	[thread overview]
Message-ID: <3hareb$nq5@lang8.cs.nyu.edu> (raw)
In-Reply-To: 3h7u4p$8cp@bellboy.ucc.uconn.edu

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




  parent reply	other threads:[~1995-02-08 16:27 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-02-07 13:55 An Ada9X mimic of C++ friends? Donald M Needham
1995-02-07 22:38 ` David Weller
1995-02-08  9:32 ` Michel Gauthier
1995-02-08 16:27 ` Cyrille Comar [this message]
1995-02-09  5:55   ` John Howard
1995-02-09  9:59     ` Stephane Barbey
1995-02-09 21:16     ` Norman H. Cohen
1995-02-10 23:11     ` Cyrille Comar
  -- strict thread matches above, loose matches on Subject: below --
1995-02-07 19:56 Dave Papay M/S 7G32 x2791
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox