comp.lang.ada
 help / color / mirror / Atom feed
From: Brian Rogoff <bpr@best.com>
Subject: Re: Extending A Generic Signature Package
Date: 1997/03/21
Date: 1997-03-21T00:00:00+00:00	[thread overview]
Message-ID: <Pine.SGI.3.95.970321164136.22672B-100000@shellx.best.com> (raw)
In-Reply-To: 5gtvbv$1nj@pandora.cs.utwente.nl


On 21 Mar 1997, Geert Bosch wrote:

> Alexander V. Konstantinou (akonstan@news.cs.columbia.edu) wrote:
> : OO people will tell you to use inheritance, but there is
> : really no reason to pay for the overhead when your abstraction
> : can be served by a compile-time check.
> 
> You shouldn't confuse using tagged types with dynamic dispatching. 
> Suppose you have this situation:

	I don't think he is. What I believe Alexander is suggesting is 
that the generic signature package provides an overhead free method for 
reusing data type specifications in new contexts.

> <details of tagged type approach deleted>
>    
> So whether a call to a primitive operation on a tagged type is dispatching or
> not is determined at the call-site. I don't know why you wouldn't want to use
> tagged types in your situation. The per-object space overhead shouldn't be
> more than one or to pointers in most compilers. 

	What if the objects are small, and there are very many of them?
Example: your signatures are of numeric types which are the elements of 
         matrices in a numerical linear algebra package. One or two
         pointers per object is too much.

	What if you just want to reuse the objects, which aren't tagged, 
and you can't rewrite them? Generic signature packages allow this. 

	I think in answer to Alexander's question, I would reexport the ops 
at each level. I don't know of any approaches that satisfy your
"writability" constraint. 

-- Brian






  reply	other threads:[~1997-03-21  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1997-03-17  0:00 Extending A Generic Signature Package david scott gibson
1997-03-18  0:00 ` Tucker Taft
1997-03-18  0:00   ` Alexander V. Konstantinou
1997-03-21  0:00     ` Geert Bosch
1997-03-21  0:00       ` Brian Rogoff [this message]
1997-03-22  0:00         ` Robert A Duff
1997-03-21  0:00 ` Jon S Anthony
1997-03-21  0:00   ` david scott gibson
1997-03-22  0:00     ` Robert A Duff
1997-03-22  0:00 ` Jon S Anthony
1997-03-21  0:00   ` david scott gibson
1997-03-22  0:00     ` Robert A Duff
1997-03-25  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