[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: More about packaging
- From: diego@...
- Date: Tue, 8 Jun 2004 18:23:57 -0400 (EDT)
Hi,
> Aside from the sandbox issues I mentioned before, that means that you are
> polluting every module's namespace with all of the base library (and
> possibly other stuff lurking around in the globals table). Not only can
> libraries then not use those names, but it will be almost impossible to
> add a new base library function (unless you check through every module
> which you might think of loading).
Can you please explain better your concerns? I am sure I missed
something. I apologize, we have been talking about a bunch of stuff at
the same time.
If you set the __index field to a table in the metatable of the
namespace, for instance, these values are only returned if they haven't
been assigned to in the namespace. The library can override. If you
actually copy the values, the library can also override.
If you iterate the namespace, the values in the __index table
don't show up. So what is the pollution?
If you use the same __index table for all libraries, every time you
modify it, all libraries "see" the change.
What is your sandboxing concern?
[]s,
Diego.