[Cuis-dev] Fwd: Re: Namespaces?

ken.dickey at whidbey.com ken.dickey at whidbey.com
Mon May 13 13:01:49 PDT 2019


-------- Original Message -------- 

 		SUBJECT:
 		Re: [Cuis-dev] Namespaces?

 		DATE:
 		2019-05-13 12:59

 		FROM:
 		ken.dickey at whidbey.com

 		TO:
 		Luciano Notarfrancesco <luchiano at gmail.com>

On 2019-05-13 09:16, Luciano Notarfrancesco wrote:

> Oh, I haven't thought about doing that trick with Symbol, seems to make a lot of sense. Maybe making Symbols unique within a package instead of globally would be enough. Still there might be a lot of work to do in order to make all tools work as expected, not sure. I'll keep this technique in mind and maybe try some experiments, thanks!

One thought is to have a "package namespace variable" which can be set
in the code browser.

The default would be #Smalltalk (and associated intern dictionary), but
setting a package namespace could cause all code to be recompiled to use
the package's internal intern dictionary.  The code browser would make
new method names be interned in the current package namespace (-> use
package intern dictionary).

Have to be careful with inheritance.

I would recommend symbols not found resolve to the parent namespace
(DAG), to allow subclassing to work as expected.  Might need to change
lookup slightly by subclassing Symbol.

$0.02,
-KenD

[PS: Oh, yes.  AOS/S# used something called 'scopes' to allow multiple
versions of code to co-exist.  You might ask Dave Simmons about this..]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190513/db815a80/attachment.html>


More information about the Cuis-dev mailing list