From: "Matthew Heaney" <mheaney@on2.com>
Subject: Re: Using "with function"
Date: Wed, 31 Oct 2001 10:58:58 -0500
Date: 2001-10-31T10:58:58-05:00 [thread overview]
Message-ID: <tu07o73i49op09@corp.supernews.com> (raw)
In-Reply-To: 3BDFA1A2.EAF8B6AA@adaworks.com
"Richard Riehle" <richard@adaworks.com> wrote in message
news:3BDFA1A2.EAF8B6AA@adaworks.com...
> It is nice to hear from Matthew Heaney. He has been absent for far too
> long from this forum, and we always enjoy his comments.
Good to be back. Hope you're looking forward to some arguments!
> I am going to respectfully disagree with Matthew on this. While using
the
> "box" makes it easier to instantiate the "with function" it also carries
with
> it some danger. Both Booch and Ed Berard made the case many years
> ago for avoiding the use of operators directly in generic formal function
> parameters.
Do you mean operatORS specifically, or any generic formal subprogram?
Also, can you be more specific about what their objection is? Do you have
any references?
> In the GRACE components it was common to see somethin
> like this:
>
> generic
> type Element_Type is private;
> with function Is_Equal(L, R : Element_Type) return Boolean;
> package GP ...
>
> This has the effect of demanding that the instantiating unit supply a
> generic actual parameter.
But isn't this required only because Ada83 wouldn't let you pass the
operator form for equality? In Ada83 you *had* to do it this way, or resort
to loopholes like the Goodenough Trick.
> I recall a PhD thesis from Ohio State (apologize for forgetting the
> author's name) in which the case was made for making all generic
> formal parameters limited private and requiring the instantiation
> to provide all kinds of operations, including a copy procedure
> since assignment cannot be overloaded.
Do you have a more specific reference? If you can narrow down the year then
maybe we can do a UMI search.
> Of course, now that we can create generic signature packages in
> Ada 95, that is packages that contain only generic formal parameters
> for further instantiation of generic formal package parameters, the
> Ohio State thesis gains a bit more credibility.
Generic formal package parameters are very helpful.
prev parent reply other threads:[~2001-10-31 15:58 UTC|newest]
Thread overview: 28+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-07-20 15:56 Using "with function" Matt Raikes
2001-07-21 5:21 ` tmoran
2001-07-21 20:30 ` Mark Lundquist
2001-10-29 17:58 ` Matthew Heaney
2001-10-30 17:49 ` Mark Lundquist
2001-10-30 22:45 ` Steven Deller
2001-11-03 4:15 ` Mark Lundquist
2001-11-03 5:11 ` Computer Language Shootout Eric Merritt
2001-11-03 6:50 ` tmoran
2001-11-03 7:15 ` Al Christians
2001-11-03 8:52 ` martin.m.dowie
2001-11-03 14:04 ` Ted Dennison
2001-11-03 14:24 ` martin.m.dowie
2001-11-03 14:49 ` Larry Kilgallen
2001-11-03 23:03 ` research@ijs.co.nz
2001-11-04 6:39 ` tmoran
2001-11-04 13:44 ` Larry Kilgallen
2001-11-05 0:59 ` Adrian Hoe
2001-11-05 8:04 ` David Brown
2001-11-06 6:36 ` AG
2001-11-06 8:05 ` tmoran
2001-11-07 8:58 ` AG
2001-11-06 12:07 ` Larry Kilgallen
2001-11-07 6:19 ` Richard Riehle
2001-11-04 15:59 ` Preben Randhol
2001-11-04 20:04 ` martin.m.dowie
2001-10-31 7:00 ` Using "with function" Richard Riehle
2001-10-31 15:58 ` Matthew Heaney [this message]
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox