From: nospam@thanks.com.au (Don Harrison)
Subject: Re: Can't export object of private type
Date: 1999/03/01
Date: 1999-03-01T00:00:00+00:00 [thread overview]
Message-ID: <F7w4s3.F1p@syd.csa.com.au> (raw)
In-Reply-To: 7b6nqe$75m$1@remarQ.com
Fraser wrote:
:I nearly cried when nospam@thanks.com.au said:
^^^^^
?
:>What about "procedure Do_Something (S : access Singleton_Type)", to
:>avoid a bunch of S.all's everywhere.
:>:I just love the way Ada compilers fill in .all for me.
:
:>Can you give an example?
:
:Sure. This is an idiom I use all the time (well, until I wrote a generic dynamic
:array package, but that's another story):
:
: type Array_Type is array (Positive range <>) of Integer;
: type Array_Access is access Array_Type;
:
: X : Array_Access;
: Y : Integer;
: Z : Array_Type (1 .. Size);
:begin
:
: X := new Array_Type'(1 .. Size);
:
: Y := X (3); -- same as X.all (3)
:
: Z := X.all; -- .all required here
:end;
:
:Subprogram access types are similar.
Okay, got you - the combination of formal access-parameters and implicit
dereferencing means that no client should have to explicitly dereference.
:Bertrand Meyer goes into this sort of thing
:in his Eiffel book, but I can't remember the term he used. You know, the bit
:about everything being accessed the same way, regardless of the underlying type.
Yes, although I also forget his term for it. The little syntactic sugar
Ada offers helps compensate for the more typical situation of enforced
literal-ness. For example, having to bother with the difference between:
- An object and a reference to it.
- A tagged type and a 'class' rooted at that type.
Given Ada's requirement for reliability, such literal-ness isn't surprising.
It's also interesting to note that some of Eiffel's weaknesses are a result
of glossing over such distinctions.
:I think Eiffel (at least in its first incarnation, I haven't checked the language's
:revision history) goes a little overboard in its race for purity (but that's another
:article).
That view seems to be widely held in Ada circles. However, I can't help
noticing that purity very neatly deals with the singleton issue (.. and a
number of other Ada problems). :)
:Not having to worry about whether something's an array or an array access
:when you index it is a small plus, but it's representative of a wider philosopher.
Agree.
--
Don (Harrison). donh at syd.csa.com.au
next prev parent reply other threads:[~1999-03-01 0:00 UTC|newest]
Thread overview: 128+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <F7JoCB.JxB@syd.csa.com.au>
1999-02-24 0:00 ` Can't export object of private type Don Harrison
1999-02-24 0:00 ` Tom Moran
1999-02-24 0:00 ` Samuel Mize
1999-02-24 0:00 ` Tucker Taft
1999-02-25 0:00 ` Don Harrison
1999-02-25 0:00 ` robert_dewar
1999-02-26 0:00 ` Don Harrison
1999-02-26 0:00 ` robert_dewar
1999-02-26 0:00 ` dennison
1999-02-26 0:00 ` bourguet
1999-02-26 0:00 ` Samuel T. Harris
1999-02-27 0:00 ` Jean-Pierre Rosen
1999-02-27 0:00 ` Simon Wright
1999-02-28 0:00 ` dewar
1999-03-01 0:00 ` bourguet
1999-03-01 0:00 ` Don Harrison
1999-03-01 0:00 ` robert_dewar
1999-03-03 0:00 ` Don Harrison
1999-03-03 0:00 ` robert_dewar
1999-03-01 0:00 ` Stephen Leake
1999-02-27 0:00 ` Brian Rogoff
1999-03-01 0:00 ` robert_dewar
1999-02-25 0:00 ` Samuel Mize
1999-02-26 0:00 ` Don Harrison
1999-02-27 0:00 ` Nick Roberts
1999-03-01 0:00 ` Don Harrison
1999-03-01 0:00 ` Matthew Heaney
1999-03-01 0:00 ` Nick Roberts
1999-03-01 0:00 ` Nick Roberts
1999-03-01 0:00 ` Don Harrison
1999-03-02 0:00 ` Matthew Heaney
1999-03-03 0:00 ` Don Harrison
1999-03-03 0:00 ` Samuel Mize
1999-03-04 0:00 ` Don Harrison
1999-03-07 0:00 ` Ehud Lamm
1999-03-03 0:00 ` Robert A Duff
1999-03-04 0:00 ` Don Harrison
1999-03-04 0:00 ` Robert A Duff
1999-03-01 0:00 ` Don Harrison
1999-03-02 0:00 ` Matthew Heaney
1999-02-28 0:00 ` Matthew Heaney
1999-03-01 0:00 ` Nick Roberts
1999-03-01 0:00 ` Matthew Heaney
1999-03-01 0:00 ` Matthew Heaney
1999-03-02 0:00 ` Nick Roberts
1999-03-01 0:00 ` Samuel Mize
1999-02-25 0:00 ` fraser
1999-02-26 0:00 ` Don Harrison
1999-02-26 0:00 ` fraser
1999-03-01 0:00 ` Don Harrison [this message]
1999-03-01 0:00 ` Matthew Heaney
1999-02-26 0:00 ` Samuel Mize
1999-03-01 0:00 ` Don Harrison
1999-03-01 0:00 ` Matthew Heaney
1999-03-02 0:00 ` fraser
1999-03-03 0:00 ` Don Harrison
[not found] ` <7b6nqe$75m$1@remarq.com>
1999-02-26 0:00 ` fraser
1999-02-27 0:00 ` Nick Roberts
1999-02-28 0:00 ` Matthew Heaney
1999-02-28 0:00 ` Matthew Heaney
1999-02-28 0:00 ` Matthew Heaney
1999-03-01 0:00 ` Tom Moran
1999-03-02 0:00 ` Matthew Heaney
1999-03-02 0:00 ` Tom Moran
1999-03-02 0:00 ` Matthew Heaney
1999-03-02 0:00 ` Tom Moran
1999-03-02 0:00 ` Matthew Heaney
1999-03-02 0:00 ` nabbasi
1999-03-02 0:00 ` Matthew Heaney
1999-03-03 0:00 ` Don Harrison
1999-03-03 0:00 ` Single Extension; Polymorphic Arrays Nick Roberts
1999-03-03 0:00 ` Nick Roberts
1999-03-08 0:00 ` Matthew Heaney
1999-03-08 0:00 ` Nick Roberts
1999-03-08 0:00 ` Tucker Taft
[not found] ` <m3ogm40wav.fsf@mheaney.ni.net>
1999-03-08 0:00 ` Nick Roberts
1999-03-08 0:00 ` Tucker Taft
1999-03-08 0:00 ` dennison
1999-03-09 0:00 ` Nick Roberts
1999-03-03 0:00 ` Can't export object of private type Don Harrison
1999-03-03 0:00 ` Don Harrison
1999-03-03 0:00 ` Nick Roberts
1999-03-04 0:00 ` Don Harrison
1999-03-04 0:00 ` Nick Roberts
1999-03-04 0:00 ` robert_dewar
1999-03-05 0:00 ` Nick Roberts
1999-03-05 0:00 ` Robert A Duff
1999-03-05 0:00 ` Abstract Subprograms of Untagged Types Nick Roberts
1999-03-05 0:00 ` Tucker Taft
1999-03-05 0:00 ` Nick Roberts
1999-03-06 0:00 ` robert_dewar
1999-03-05 0:00 ` robert_dewar
1999-03-04 0:00 ` Can't export object of private type Nick Roberts
1999-03-08 0:00 ` Matthew Heaney
1999-03-09 0:00 ` Don Harrison
1999-03-09 0:00 ` Matthew Heaney
1999-03-09 0:00 ` Nick Roberts
1999-03-10 0:00 ` Don Harrison
1999-03-10 0:00 ` Matthew Heaney
1999-03-04 0:00 ` fraser
1999-03-09 0:00 ` Don Harrison
1999-03-08 0:00 ` Matthew Heaney
1999-03-08 0:00 ` Nick Roberts
1999-03-08 0:00 ` Matthew Heaney
1999-03-10 0:00 ` Don Harrison
1999-03-10 0:00 ` Matthew Heaney
1999-03-10 0:00 ` dennison
1999-03-10 0:00 ` Robert A Duff
1999-03-10 0:00 ` robert_dewar
1999-03-10 0:00 ` dennison
1999-03-11 0:00 ` dennison
1999-03-10 0:00 ` robert_dewar
1999-03-10 0:00 ` dennison
1999-03-10 0:00 ` robert_dewar
1999-03-10 0:00 ` dennison
1999-03-11 0:00 ` dennison
1999-03-11 0:00 ` bill
1999-03-11 0:00 ` dennison
1999-03-11 0:00 ` Scott Ingram
1999-03-11 0:00 ` Larry Kilgallen
1999-03-12 0:00 ` dewar
1999-03-11 0:00 ` robert_dewar
1999-03-11 0:00 ` Don Harrison
1999-03-12 0:00 ` robert_dewar
1999-03-11 0:00 ` Don Harrison
1999-03-03 0:00 ` Don Harrison
1999-02-28 0:00 ` Matthew Heaney
1999-02-28 0:00 ` Matthew Heaney
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox