[Cuis-dev] Namespace Code Sketch

ken.dickey at whidbey.com ken.dickey at whidbey.com
Wed Jun 10 07:41:26 PDT 2020


Greetings,

I have done enough playtime to want to share a "technology preview"

   https://github.com/KenDickey/PackageEnvironments

As many of you have played around with this already, the idea is avoid 
name collisions when loading multiple packages with the same Class 
names, e.g. to have multiple kinds of card games from different authors 
within the same image.  The gist is to have Environments for Class name 
lookup which do not register the class names in the Smalltalk 
dictionary.

To make this "the Cuis Way", there is a 'System-Environments' Feature, 
so no one has to use Environments.  Only if you want/need them.

The idea is that instead of
   Feature require: 'MyCoolFeature'.
one does
   Environment fromFeature: 'MyCoolFeature'.
and everything just works.

I have only done the bit of converting a loaded CodePackage, but wanted 
to get the ideas out to see if perhaps there is interest in helping me 
complete this.

In particular, the refactoring and other tools will need some tweaks.

Notes are in the README.md in the PackageEnvironments repo.

Any way, I think things are simple enough to benefit from some early 
feedback.

Not yet a complete solution, but I wanted to share before things got 
complex.

As you may know, my motto is "If I make it simple enough, even I can 
implement it".  ;^)

Enjoy Cuis!!
-KenD


More information about the Cuis-dev mailing list