[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal: An OOC Package Tool



>As far as versioning, what is wrong with saying ''IMPORT CO :=
>edu.uci.ics.lagoona.core.Collections.Version-7.0.1'?  Later on, one can change
>the version suffix and recompile.  You can even pull in multiple versions of
>the same package (well, several packages, really), and give all of them
>different aliases...

I think having one version for each package might not be powerful enough.
Especially, it might hinder extensibility. Imaging that someone fixes some bugs
in version 7.0.1 and renames it to 7.0.2, then your program cannot 
automatically
make use of the new procedures. This is especially important if the 
client and the
server package are provided by different companies.

What you rather might wanna have, is individual version numbers for individual
entities, such as procedures, or variables. You then just import
edu.uci.ics.lagoona.core.Collections and if some entities require a 
special version number
(e.g., because you work around a specific bug) then you might still 
be able to check
the version number of the entity in the program at runtime:

   IF VERSION (foo.bar) < 5 THEN
      Bailout ("Need at least version 5 of foo.bar");
   ELSIF VERSION (foo.bar) > 7 THEN
      foo.do (); (* without the fix, assuming the error has been corrected *)
   ELSE (* for versions 5, 6, and 7 the fix is needed *)
      (* "prefix" *)
      foo.do ();
      (* "postfix" *)
   END;

-Thomas

---------------------------------------------------------------------------
Thomas Kistler                                  http://i.am/thomas.kistler/