[Cuis-dev] Namespaces?

Luciano Notarfrancesco luchiano at gmail.com
Mon May 13 09:17:15 PDT 2019


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!

On Mon, May 13, 2019 at 2:46 PM <ken.dickey at whidbey.com> wrote:

> On 2019-05-13 05:21, Luciano Notarfrancesco via Cuis-dev wrote:
>
> > Hi everybody,
> > Every now and then I wish we had namespaces. What's the simplest
> > namespace-like thing that could allows us to simultaneously load two
> > packages with clashing class names?
>
> Luciano,
>
> There are many ways to do namespaces.
>
> Perhaps the simplest is to have multiple #symbol hashmaps.
>
> You probably know that 'someSring' as always yields the same symbol.
> See #Symbol class>>intern:
>
> Having a uniq hashmap for each namespace gives multiple symbols with the
> same spelling -- one per namespace.
>
> This has also been used for multiple versions of code.  Useful when
> debugging a new version of the debugger -- just use the old, working
> code to debug the new.
>
> The tools need to display symbols with some font/annotation so that you
> know to which namespace a symbol belongs, Code Browser needs to add
> methods using selectors in the proper namespace and so on.  Much
> confusing otherwise.
>
> FYI,
> -KenD
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.cuis.st/mailman/archives/cuis-dev/attachments/20190513/720a95c0/attachment.html>


More information about the Cuis-dev mailing list