Library deprecation (was: RE: monad library)

Andrew J Bromage ajb@spamcop.net
Fri, 1 Aug 2003 11:37:58 +1000


G'day all.

On Wed, Jul 30, 2003 at 03:11:23AM -0700, John Meacham wrote:

> There is another more radical suggestion we might want to consider.
> explicitly versioned interfaces.

I'm pretty wary of explicitly versioned interfaces.

Just about every change to a Haskell library is source-incompatible, at
least in theory.  Something as simple as adding a function can cause a
namespace clash with some other module.  Adding a typeclass instance can
clash with an instance that you declared yourself.

Even fixing a bug effectively changes the interface to a library.  No,
it probably doesn't change the _documented_ interface, but it may well
change the interface that you tested your program against.

Admittedly these situations are going to be rare given well-written
programs and libraries, but that version number may encourage a
programmer to think that it can't happen.

I think that the argument is different for component-based programming,
where one of the criteria is to allow changing vendors of a component
or allowing third-parties to write their own "plug ins".  For
libraries, however, these issues are not so important.

For libraries, in fact, what most programmers want is to require the
version of some library being used to be greater than or equal to some
minimum targeted version.  GUIDs seem overkill where a single number
would suffice.

As always, I'm willing to be persuaded otherwise, but at the moment I
can't see the benefit.

Cheers,
Andrew Bromage