James Giles wrote:
> [log in to unmask] wrote:
> ...
> > I'm still skeptical about the desirability of the processor keeping a
> > database of instances. If you have a system-wide database, I can see
> > changing one jot or tittle triggering a compilation that may take weeks.
>
> ???
> I still can't get why you bring this up. An implementation that
> statically resolves generic references has to maintain a database
> of all instanced versions of the generic, no matter how they are
> instanced.
If the parametric entity is a "library" entity for which numerous instances
have been created, and one makes a minor change in it, say to increase the
performance by a few percent, one may want to recompile only the instance
relevant to a particular program -- say one where that procedure is in
the inner loop. If the program building system uses "eager evaluation"
it might well decide to recompile all of the instances that ever existed,
which could cascade throughout an extensive library. It may compile
instances that are not used in any program that is still in use. The
compile time is, however, secondary to the recertification time. Some
organizations have a not unreasonable policy that if something is recompiled,
it has to be recertified before it can be redeployed.
In addition to the obvious reason not to want separate instances of
a parametric entity, there are good reasons for users to want separate
instances of it. For example, it may have a saved variable. It is
therefore desirable for users to be able to control whether separate
but essentially identical instances exist. I've never heard anybody
whine about the burden of explicit instantiation in Ada.
--
Van Snyder | What fraction of Americans believe
[log in to unmask] | Wrestling is real and NASA is fake?
Any alleged opinions are my own and have not been approved or disapproved
by JPL, CalTech, NASA, Sean O'Keefe, George Bush, the Pope, or anybody else.
|