Library deprecation (was: RE: monad library)

Malcolm Wallace Malcolm.Wallace@cs.york.ac.uk
Wed, 30 Jul 2003 10:54:53 +0100


"Simon Marlow" <simonmar@microsoft.com> writes:

> It seems to me that we do need a way to have multiple versions of an API
> available, however.  We can do this two ways:
> 
>  1. Use a top-level name 'Old', for old versions of libraries.
>  2. Use a suffix instead.
> 
> (1) means you can retain the structure of the original hierarchy inside
> Old, and different versions of APIs are completely separate.  (2) means
> less moving around of source files.  On balance, think I prefer (1).

Hmmm, I think (2) also requires every original source file to be moved
and renamed.  For instance, the file Control/Monad.hs moves into the
directory Control/Monad, and is renamed Old.hs, and likewise every
X/Y/Z.hs becomes X/Y/Z/Old.hs, so you introduce a new directory for
every previous file.

The option (1) looks much better from this point of view.  Just move
the whole directory hierarchy in one go.  Also, deprecated imports will
also be uniformly recognisable because of "Old." as a prefix on the
front of imports, so they line up in a column.  As a suffix, ".Old"
would tend to disappear in the jagged right-hand edge of the import
list, possibly leading to maintenance problems if one gets accidentally
overlooked.

Regards,
    Malcolm