jed-users mailing list

[2003 Date Index] [2003 Thread Index] [Other years]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]

Re: Namespaces for modes?


begin  "John E. Davis" <davis@xxxxxxxxxxxxx> wrote:
> example, I am toying with the idea of adding namespace objects to
> slang 2.  For example, suppose ns represents a namespace that contains
> functions set and get, e.g.,
>  [...]
> However, slang 2 _may_ allow instances of a namespace, e.g.,
> 
>     x = @ns;
>     y = @ns;

I would prefer a new operator. Without it is somewhat confusing and not
really intuitive.

> where now x and y represent separate instances of the namespace.
> Perhaps you can see where I am going with this.

Yes, this sounds good.

>>> autoload("latex->", "latex.sl");
>>
>>This would indeed be a nice thing to have (however, I fear it is not
>>easily done)!
> 
> Yep-- I have not thought of a good implementation for this.

I would expand _SLang_NameSpace_Type for a char* filename and in
locate_namespace_encoded_name() I would check, if it is != NULL and if
so, I would load the file with SLang_load_file() and operate like it was
there before. I would act like execute_slang_fun() does, but I don't
know, if locate_namespace_encoded_name() is the only point, where it is
necessary.

Joerg.

-- 
The UNIX Guru's View of Sex:
# unzip ; strip ; touch ; finger ; mount ; fsck ; more ; yes ; umount ; sleep

--------------------------
To unsubscribe send email to <jed-users-request@xxxxxxxxxxx> with
the word "unsubscribe" in the message body.
Need help? Email <jed-users-owner@xxxxxxxxxxx>.


[2003 date index] [2003 thread index]
[Thread Prev] [Thread Next]      [Date Prev] [Date Next]