comp.lang.ada
 help / color / mirror / Atom feed
From: Farshad Nayeri <farshad@cmass.com>
Cc: farshad@cmass.com, kalsow@cmass.com, steve@cmass.com
Subject: Re: Ada95 OOP Questions
Date: 1996/08/20
Date: 1996-08-20T00:00:00+00:00	[thread overview]
Message-ID: <3219EB97.76B0@cmass.com> (raw)


Eric Newton said:

> The point of the (deleted) example was to show that 
> a package is just a namespace, and that multiple classes 
> can live in that namespace, and that the features of 
> the class do not need to be visibly associated
> with the dispatch object.  Matrixes encapsulates 
> Matrix *and* Vector types. I can list the Matrix and 
> Vector operations willy-nilly within this namespace.  

> In C++/Modula-3 I must list the operations on
> the private state of Matrix within the Matrix class. 
> I must list the operations on the private state of 
> Vector within the Vector class.
> There is visible association of dispatch methods and type.

I believe this is an inaccurate representation of the way Modula-3 
organizes namespaces and visibility. Much care went into designing 
namespaces and avoiding problems in the C++ "private" state model. 

Modula-3 has separate mechanisms for encapsulation (modules & 
interfaces) and inheritance and dispatching (object types). 
Using partial revelation--where one interface can reveal partial 
information about various types; others can import only the necessary 
features by importing that interface--Eric can do the kinds of 
groupings he was talking about.

Steve Freeman has written a nice article for Dr. Dobb's Journal,
comparing the encapsulation and grouping facilities of Ada95, 
C++, Eiffel, and Modula-3. He addresses precisely the kinds of issues that
Eric mentioned and goes through code examples to illustrate his
point. A copy of the article is available via the web:

http://www.research.digital.com/SRC/modula-3/html/partial-rev/index.html

Regards, -- Farshad

--
Farshad Nayeri
Critical Mass, Inc.
http://www.cmass.com/

Disclaimer: I am biased!




             reply	other threads:[~1996-08-20  0:00 UTC|newest]

Thread overview: 46+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-08-20  0:00 Farshad Nayeri [this message]
  -- strict thread matches above, loose matches on Subject: below --
1996-08-20  0:00 Ada95 OOP Questions Farshad Nayeri
1996-08-21  0:00 ` Jon S Anthony
1996-08-08  0:00 W. Wesley Groleau (Wes)
1996-07-28  0:00 Spasmo
1996-07-28  0:00 ` Andre Spiegel
1996-07-28  0:00   ` Spasmo
1996-07-29  0:00     ` Thomas Kendelbacher
1996-07-31  0:00       ` Spasmo
1996-08-01  0:00         ` Thomas Kendelbacher
1996-08-02  0:00         ` Gene Ouye
1996-08-01  0:00       ` Jon S Anthony
1996-07-30  0:00     ` David Wheeler
1996-07-31  0:00       ` Spasmo
1996-07-30  0:00     ` Ken Garlington
1996-08-04  0:00       ` Spasmo
1996-07-28  0:00 ` David C. Hoos, Sr.
1996-07-28  0:00   ` Spasmo
1996-07-29  0:00 ` Andre Spiegel
1996-07-29  0:00   ` Thomas Kendelbacher
1996-08-02  0:00     ` Robert Dewar
1996-08-05  0:00       ` Thomas Kendelbacher
1996-08-06  0:00         ` Robert I. Eachus
1996-08-06  0:00         ` Robert Dewar
1996-08-06  0:00           ` Thomas Kendelbacher
1996-08-06  0:00             ` Robert A Duff
1996-08-07  0:00               ` Robert Dewar
1996-08-08  0:00                 ` Robert A Duff
1996-08-09  0:00                   ` Robert Dewar
1996-08-12  0:00             ` Robert I. Eachus
1996-08-08  0:00           ` Theodore E. Dennison
1996-08-09  0:00             ` Robert Dewar
1996-08-12  0:00             ` Joel VanLaven
1996-08-10  0:00         ` Chris Morgan
1996-07-29  0:00   ` David Wheeler
1996-07-30  0:00     ` Spasmo
1996-07-30  0:00     ` Spasmo
1996-07-30  0:00 ` Robert I. Eachus
1996-07-30  0:00 ` Andre Spiegel
1996-07-30  0:00 ` Andre Spiegel
1996-08-01  0:00 ` Jon S Anthony
1996-08-13  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Eric C. Newton
1996-08-14  0:00 ` Ken Garlington
1996-08-14  0:00 ` Jon S Anthony
1996-08-21  0:00 ` Jon S Anthony
replies disabled

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