comp.lang.ada
 help / color / mirror / Atom feed
From: cgreen@yosemite.atc.com (Christopher Green)
Subject: Re: Ada generics are bad
Date: 1998/04/13
Date: 1998-04-13T00:00:00+00:00	[thread overview]
Message-ID: <6gs5qa$s46@newshub.atmnet.net> (raw)
In-Reply-To: dewar.892345837@merv


In article <dewar.892345837@merv>, Robert Dewar <dewar@merv.cs.nyu.edu> wrote:
>Chris Green says
>
><<With "function form" generics, updating and recompiling the generic body
>does not obsolete units that instantiate it or depend on instantiations,
>and it is possible to deliver libraries that include only object code
>for such bodies (this is a key concern for developers of commercial Ada
>software such as ourselves, who are wary of releasing more source code
>than we absolutely have to).
>>>
>
>Very often an approach that works well is to isolate the "generic" parts
>of the body, and use common code for the non-generic parts. Look at the
>GNAT code for an example of how this is done, in particular, look at
>the code for Float_IO. Almost nothing of interest is in the generic itself,
>all the "good stuff" is in the common units.

All good; however, sometimes one is stuck with maintaining existing code
that was not written with an eye to isolating generics in packages that
are not widely depended upon.  Then one finds, as the original poster did, 
that updating the generic body has a high cost in recompilation of other,
often quite unrelated, code.  Function-form generics and compilers with
smart recompilation are helpful in dealing with this kind of problem,
though they are no substitute for doing good design up front.

>This could be used to "solve" the "problem" of releasing more source code
>than you absolutely have to, although from a users point of view, using
>libraries where you do not have the source and do not know what is going
>on seems pretty dubious. I suppose if the only option you have is to use
>closed software of this kind, then the risk may be acceptable. 

Such closed software is standard (though far from universal) practice in 
the commercial "C" world.  

Whether it is desirable is a different question entirely:  from the de-
veloper's point of view, the more control retained over the source, the
better; from the user's point of view, the more access to the source, the
better.  The marketplace has a way of forcing sellers and buyers to reach
reasonable compromises.

-- 
Chris Green                                  Email cgreen@atc.com
Advanced Technology Center                   Phone (714) 583-9119
22982 Mill Creek Drive                                   ext. 220
Laguna Hills, CA 92653                       Fax   (714) 583-9213




  reply	other threads:[~1998-04-13  0:00 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1998-04-08  0:00 Ada generics are bad Glenden Lee
1998-04-08  0:00 ` Tucker Taft
1998-04-09  0:00 ` Anonymous
1998-04-10  0:00 ` Christopher Green
1998-04-10  0:00   ` Brian Rogoff
1998-04-11  0:00   ` Robert Dewar
1998-04-13  0:00     ` Christopher Green [this message]
1998-04-13  0:00       ` Matthew Heaney
1998-04-13  0:00         ` Christopher Green
1998-04-13  0:00         ` nabbasi
1998-04-13  0:00           ` future of proprietry source code (was: Ada generics are bad) Fergus Henderson
1998-04-14  0:00             ` David Masterson
1998-04-16  0:00               ` David Kastrup
1998-04-16  0:00                 ` David Masterson
1998-04-17  0:00                   ` David Kastrup
1998-04-17  0:00               ` campo
1998-04-16  0:00             ` Tim Smith
1998-04-17  0:00               ` Thomas Bushnell, n/BSG
1998-04-18  0:00                 ` Bill Gribble
1998-04-20  0:00                   ` Ole-Hjalmar Kristensen
1998-04-21  0:00             ` William Tanksley
1998-04-14  0:00         ` Ada generics are bad Al Christians
1998-04-14  0:00         ` Robert Munck
1998-04-14  0:00           ` Matthew Heaney
1998-04-15  0:00           ` Jonathan Guthrie
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox