<div dir="ltr">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!</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, May 13, 2019 at 2:46 PM <<a href="mailto:ken.dickey@whidbey.com">ken.dickey@whidbey.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On 2019-05-13 05:21, Luciano Notarfrancesco via Cuis-dev wrote:<br>
<br>
> Hi everybody,<br>
> Every now and then I wish we had namespaces. What's the simplest <br>
> namespace-like thing that could allows us to simultaneously load two <br>
> packages with clashing class names?<br>
<br>
Luciano,<br>
<br>
There are many ways to do namespaces.<br>
<br>
Perhaps the simplest is to have multiple #symbol hashmaps.<br>
<br>
You probably know that 'someSring' as always yields the same symbol.<br>
See #Symbol class>>intern:<br>
<br>
Having a uniq hashmap for each namespace gives multiple symbols with the <br>
same spelling -- one per namespace.<br>
<br>
This has also been used for multiple versions of code. Useful when <br>
debugging a new version of the debugger -- just use the old, working <br>
code to debug the new.<br>
<br>
The tools need to display symbols with some font/annotation so that you <br>
know to which namespace a symbol belongs, Code Browser needs to add <br>
methods using selectors in the proper namespace and so on. Much <br>
confusing otherwise.<br>
<br>
FYI,<br>
-KenD<br>
</blockquote></div>