[Cuis-dev] [RFC] Modules/Namespaces for Cuis

Gerald Klix cuis.01 at klix.ch
Sat Oct 3 05:09:18 PDT 2020


On 2020-10-03 08:40, Luciano Notarfrancesco via Cuis-dev wrote:
> Hi Gerald,
> I’ve been testing ideas for namespaces too, I’m not sure if you’re aware of
> this approach:
> https://lists.cuis.st/mailman/archives/cuis-dev/2020-June/002064.html
> 
> On Sun, 27 Sep 2020 at 6:44 PM, Gerald Klix via Cuis-dev <
> cuis-dev at lists.cuis.st> wrote:
> 
>> Hi all, hi Juan,
>>
>>
>>
>> is there any interest in a simple module or
>>
>> namespace implementation for Cuis?
>>
>>
>>
>> I imagine a simple class-name-prefix based approach, that just binds
>>
>> exported classes
>>
>> to shorter names -- usually with the prefix stripped -- in pool
>>
>> dictionaries.
>>
>> Implementing the import machinery will
>>
>> as simple as automatically adding pool dictionaries to the classes in
>>
>> the importing module.
>>
>>
>>
>> Alas even this simple approach would
>>
>> require some additions to the package
>>
>> implementation. The module definitions
>>
>> must be exported, too, and certainly
>>
>> before the class definitions.
>>
>>
>>
>>
>>
>> I am looking forward to your feedback,
>>
>>
>>
>> Gerald
>>
>> --
>>
>> Cuis-dev mailing list
>>
>> Cuis-dev at lists.cuis.st
>>
>> https://lists.cuis.st/mailman/listinfo/cuis-dev
>>
>>
> 
> 
Hi Luciano,

No sorry, I wasn't aware of your work,
thanks for the pointer.

Now that I read your e-mail:
It's more or less the same approach as my
original suggestion, but did not want to bother
with dots in global names. (I once modified
the compiler, decompiler and the shout styler,
to deal with multi-methods and I am still not
satisfied with the result, but that's
a completely different story ... Don't get
me started, it wasn't exactly fun)

Ken convinced me to modify SystemDictionary to
bind objects, that belong to namespaces
somewhere else, but keep them discoverable ...
and while writing this e-mail, I was under
impression that this effort will result
in a hell of a change set -- I checked
just 3 minutes ago and, well, so far I
only have identified 11 methods that
need hooks to deal with environments.

Until then, I wasn't sure,
whether this will "carry its own weight",
as Juan put it in another thread.
Now I am mildly optimistic.

If it doesn't work out, I will continue
with (something like) your approach.


Best Regards,

Gerald


More information about the Cuis-dev mailing list