Quick comparison of two Namespaces proposals

Michael van der Gulik mikevdg at gmail.com
Mon Sep 17 22:26:11 UTC 2007


On 9/18/07, Igor Stasenko <siguctua at gmail.com> wrote:
>
>
>
> It was me, who proposed Michael van der Gulik's to add package
> dependencies.
> Besides Namespaces, keeping package dependencies is important thing to
> make single image holding every known package in squeak universe (by
> universe i mean all known forks, which currently forced to keep own
> separated development branches and cannot be used with single image
> due to many conflicts).
> With package hierarchies, you can have image working with different
> forks, and even interoperate them.
>
> The idea was to keep own namespace(i.e. - globals and behaviors) for
> each package,  and also keep a list of imported packages.
> Only single package should not have any imports - its a Kernel package.
> Any others have at least Kernel in imports.
> Now, how things going on:
> suppose you making own package and want to modify some classes/methods
> in package(s) you import.
> When you making changes, they going not to imported package, but in
> your package instead. This is much likely you adding an extensions
> with MC (adding category *MyPackage extensions to foreign class), but
> in much more clever way :)


Sorry Igor, but I never implemented having overrides of other Packages'
classes in a Package. I can't work out how to do it! If anybody knows how
without creating an environment for making obscene spaghetti code, please
let me know. I admit this is a great loss to the Smalltalkiness of my
approach - you can't add methods to String!

For the meanwhile, a workaround is to copy the package where the overrided
method would have been, modify it and update the imports to use it. My
packaging system will make sure that the modified package will be loaded and
used rather than the original (without modifying the original package which
may also be installed in your image).


An update operation is pretty simple. Suppose i maintainer of package
> X, which currently imports packages Y 1.0  and Z 1.0. Now i want to
> update my package to use Y 2.0 and Z 3.0.
>
> I simply clicking 'update imports', and creating a new separate
> version of my package with replaced imports. Now i can run tests/debug
> e.t.c. When i considered that all is fine, now i can set it as default
> 'release' version and publish it.


This will all work. The  "update imports" feature will be there soon.

Regards,
Gulik

(I think I'll use "Gulik" as a handle considering how many "Michaels" there
are in the world).
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20070918/00fb91e3/attachment.htm


More information about the Squeak-dev mailing list