From: "Pat Rogers" <progers@NOclasswideSPAM.com>
Subject: Re: Why both "with" and "use"?
Date: 1999/02/13
Date: 1999-02-13T00:00:00+00:00 [thread overview]
Message-ID: <7a4pem$qlc$1@remarQ.com> (raw)
In-Reply-To: 7a4j3h$64e@drn.newsguy.com
bill wrote in message <7a4j3h$64e@drn.newsguy.com>...
<snip>
>Also, in Java a package seems to have different purpose than with
Ada. In
>Java a package is a collection of classes. In OO Ada, a package
usually
>contains one tagged type. or is this not the normal practice?
A package serves more of a central purpose in Ada 95, especially when
it exports a tagged type declaration.
The big difference (or, at least one difference) between Java packages
and Ada packages is that the combination of an Ada package and a
private type defines an Abstract Data Type. An ADT is defined as a
set of legal operations and legal values, and little else. In Ada
these legal operations are called "primitive operations". The
primitive operations are those subprograms that are both declared
*with* the type in the *same* package and that manipulate values of
the type as either formal parameters or (for functions) result types.
It is these primitive operations that are inherited during derivation,
and only they can be dispatched to, dynamically, at run-time.
An OOP object is really just an ADT plus run-time polymorphism, and a
private (tagged) type defines an ADT. You can't have private types
without packages, so packages are critical to OOP with Ada. Note that
tagged types need not be private, but the encapsulation provided by
private types is considered a central characteristic of objects in
OOP.
---
Pat Rogers Training & Development in:
http://www.classwide.com Deadline Schedulability Analysis
progers@acm.org Software Fault Tolerance
(281)648-3165 Real-Time/OO Languages
next prev parent reply other threads:[~1999-02-13 0:00 UTC|newest]
Thread overview: 55+ messages / expand[flat|nested] mbox.gz Atom feed top
1999-02-13 0:00 Why both "with" and "use"? Mike Silva
1999-02-13 0:00 ` Corey Minyard
1999-02-13 0:00 ` Matthew Heaney
1999-02-13 0:00 ` bill
1999-02-14 0:00 ` Matthew Heaney
1999-02-14 0:00 ` dewar
1999-02-14 0:00 ` dewar
1999-02-13 0:00 ` Tom Moran
1999-02-14 0:00 ` Matthew Heaney
1999-02-16 0:00 ` Samuel Mize
1999-02-17 0:00 ` Jean-Pierre Rosen
1999-02-18 0:00 ` dennison
1999-02-18 0:00 ` robert_dewar
1999-02-19 0:00 ` Robert I. Eachus
1999-02-19 0:00 ` Brian Hanson
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` robert_dewar
1999-02-23 0:00 ` Robert I. Eachus
1999-02-19 0:00 ` dennison
1999-02-19 0:00 ` bourguet
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` Matthew Heaney
1999-02-19 0:00 ` dennison
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` Ada multiple string personalities. why so many? mike
1999-02-19 0:00 ` Tom Moran
1999-02-19 0:00 ` Mike Silva
1999-02-22 0:00 ` Brian Hanson
1999-02-19 0:00 ` robert_dewar
1999-02-19 0:00 ` Why both "with" and "use"? dennison
1999-02-19 0:00 ` robert_dewar
1999-02-18 0:00 ` robert_dewar
1999-02-18 0:00 ` Jean-Pierre Rosen
1999-02-18 0:00 ` robert_dewar
1999-02-19 0:00 ` Jean-Pierre Rosen
1999-02-17 0:00 ` Matthew Heaney
1999-02-17 0:00 ` dennison
1999-02-17 0:00 ` Samuel Mize
1999-02-17 0:00 ` Nick Roberts
1999-02-17 0:00 ` Jean-Pierre Rosen
1999-02-13 0:00 ` mike
1999-02-13 0:00 ` Pat Rogers
1999-02-13 0:00 ` bill
1999-02-13 0:00 ` Matthew Heaney
1999-02-13 0:00 ` Pat Rogers [this message]
1999-02-13 0:00 ` Matthew Heaney
1999-02-13 0:00 ` bill
1999-02-14 0:00 ` Pat Rogers
1999-02-14 0:00 ` Bob Collins
1999-02-14 0:00 ` Pat Rogers
1999-02-16 0:00 ` Samuel Mize
1999-02-15 0:00 ` Jean-Pierre Rosen
1999-02-15 0:00 ` Ed Falis
1999-02-16 0:00 ` Jean-Pierre Rosen
1999-02-15 0:00 ` Jean-Pierre Rosen
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox