comp.lang.ada
 help / color / mirror / Atom feed
From: nospam@thanks.com.au (Don Harrison)
Subject: Re: Can't export object of private type
Date: 1999/03/04
Date: 1999-03-04T00:00:00+00:00	[thread overview]
Message-ID: <F825IK.2px@syd.csa.com.au> (raw)
In-Reply-To: 7bjihr$25t7@news1.newsguy.com

Sam Mize wrote:

:Don Harrison <nospam@thanks.com.au> wrote:
:> Matt Heaney wrote:
:
:> :If you know up front how many "instances" of an abstraction you have
:> :--what I call the "well-known objects" pattern-- then a state machine
:> :package is probably the way to go.  
:> 
:> Partitioning objects into "well-known" and less-well-known :)  will always 
:> be somewhat arbitrary.
:
:Perhaps a clearer term would be "enumerable" if this kind of confusion is
:going to occur.  It doesn't seem arbitrary to me that either you can list
:all the objects up front, by their nature, like the planets -- or not.

I think you're right that this kind of abstraction usually is enumerable
but the property which suggests their implementation as a state machine is 
that their underlying behaviour is well-defined and isn't expected to change. 
This quality obviates the need for an explicit derivable type.

The problem, of course, is that you're relying on foresight in anticipating 
no future requirement for variants. We can forsee future needs to some extent 
but not perfectly. 


:>However, in the context of non-pure OOPLs (such as 
:> Ada), you're probably right in suggesting it's worth distinguishing between 
:> single-fixed-variant (your "well-known") objects and more general ones. 
:> The additional flexibility gained in declaring an explicit derivable type 
:> is a waste of time if future variants are unlikely.
:
:Is it not a waste of time in an OOPL, or is it not possible to avoid
:doing it in an OOPL?  (That sounds confrontational and I apologize, but
:I can't think of a better way to phrase it.)

A decent pure OOPL (such as Eiffel) will leave open the possibility of 
deriving variants. Eiffel doesn't give you a choice - every class can 
have heirs, although you can freeze particular primitive operations if 
you choose. The downside is a loss of execution speed - roughly 15% of 
dispatching calls aren't optimised to non-dispatching calls (Gnu Eiffel).


:> :In a typical Ada application, some abstractions are implemented as state
:> :machine packages, and some abstractions are implemented as instances of
:> :an abstract data type.  There is nothing odd or unnatural about this.
:> 
:> It's certainly idiomatic.
:
:Does you mean this to counter Matt's statement?  

No. I mean to agree that it's idiomatic - even if I disagree with the 
philosophy leading to the idiom. :)

Ada allows you to choose the degree of reusability for abstractions. Many 
Ada developers exercise that choice and choose lower reusability and that 
may be reasonable for abstractions that have little prospect of changing. 
I prefer to err on the side of more reusability .. which inevitably makes 
my code less idiomatic.

:If a language forces you
:to use just one or the other, you would, and that would be idiomatic too.

Certainly - for example, idiomatic Eiffel maximises derivability.

:I'm not sure what you're trying to get across.

Agreement with the expressed facts without disagreeing with the underlying 
philosophy that leads to them. :)


-- 
Don (Harrison).   donh at syd.csa.com.au






  reply	other threads:[~1999-03-04  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             ` bourguet
1999-02-26  0:00               ` Samuel T. Harris
1999-02-27  0:00                 ` Simon Wright
1999-02-27  0:00                 ` Jean-Pierre Rosen
1999-02-28  0:00               ` dewar
1999-03-01  0:00                 ` bourguet
1999-02-26  0:00             ` dennison
1999-03-01  0:00             ` Stephen Leake
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-02-27  0:00         ` Brian Rogoff
1999-03-01  0:00           ` robert_dewar
1999-02-25  0:00       ` fraser
1999-02-26  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-26  0:00           ` fraser
1999-03-01  0:00             ` Don Harrison
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
1999-02-28  0:00           ` Matthew Heaney
1999-02-28  0:00         ` Matthew Heaney
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-02  0:00               ` Matthew Heaney
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 [this message]
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-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-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                           ` Tucker Taft
     [not found]                             ` <m3ogm40wav.fsf@mheaney.ni.net>
1999-03-08  0:00                               ` Tucker Taft
1999-03-08  0:00                                 ` dennison
1999-03-09  0:00                                 ` Nick Roberts
1999-03-08  0:00                               ` Nick Roberts
1999-03-08  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                       ` fraser
1999-03-09  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-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_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                                 ` bill
1999-03-11  0:00                                   ` Scott Ingram
1999-03-11  0:00                                     ` Larry Kilgallen
1999-03-11  0:00                                   ` dennison
1999-03-12  0:00                                   ` dewar
1999-03-11  0:00                                 ` dennison
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-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-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