A Squeak Packaging Proposal

ajh18 at cornell.edu ajh18 at cornell.edu
Thu Aug 9 19:55:48 UTC 2001


Ned Konz <ned at bike-nomad.com> wrote:
> How would it be possible to allow prerequisites in a range of _versions_?

Stephen Pair <spair at advantive.com> wrote:
> I think an interface (protocol) based solution to this issue is the best

My design does not allow a range of possible prerequisites, you just
pick one.  I am just trying to slice up an image, into small pieces that
can be passed around.  I don't think we need an extra level of
complexity such as versions or interfaces.  If you want to make an
incremental change to a package add the change to a new package and make
the old one its prerequisite.  Then go to all dependent packages and
make new versions of them that point to their old package and to your
new package.  Packages are searched in topological sort order so your
new package will alway be seen before its original.  Making new versions
of dependent packages can be automated.

I think it is correct to require new versions of dependent packages
since your change could cause things to break even if the interface does
not change.  Consider if you change the implementation of some method
that returns a collection.  But in the first implementation you always
recreate the collection, but in the second one you decide to cache it. 
Some user of this method in a dependent package may be adding stuff to
the resulting collection assuming that your method always created a
fresh collection.  But now that the collection is cached his objects
will be remembered inadvertently.

I guess what I'm saying is that interfaces, types, specifications, etc.
are not as complete as the implementation, and you really can't separate
interface from implementation.  Maybe that's one of the reasons why the
Smalltalk inventors opted to leave out types.

Cheers again,
Anthony




More information about the Squeak-dev mailing list