Re: Registries

Daniel Wallin <[email protected]>
Newsgroups gmane.comp.lib.boost.langbinding
Message-ID <5.1.0.14.0.20030716225157.03c95e40__18176.1588821702$1059273094@student.umu.se>
At 21:13 2003-07-16, David Abrahams wrote:
>Daniel Wallin <[email protected]> writes:
>
> > At 18:54 2003-07-16, David Abrahams wrote:
> >>Daniel Wallin <[email protected]> writes:
> >>
> >> > Could you explain more how the modules would nest,
> >>
> >>I don't understand the question.  Python has module (package)
> >>hierarchies, so a top-level module foo might have a sub-module foo.bar
> >>
> >>Users can create submodules by sticking them in a package hierarchy,
> >>or by opening a new module scope with
> >>
> >>    module('bar') [ ... ]
> >>
> >>if we accept the luabind syntax.
> >
> > Oh ok, I wasn't aware of how Pythons module system works. So when
> > you import a submodule, the parent module is automatically loaded as
> > well?
>
>I think that's effectively true.
>
> > Anyway, this means the scoped converters would be python specific,
> > or at least not supported by lua. (since lua doesn't even have
> > modules in the python sense).
>
>I don't see why not.  You seem to have support for them in luabind,
>and it does make a convenient way to reflect nested namespaces.

That depends on what you mean by "support". module() in luabind is
really just an alias for namespace_, which can be used only at
top-level, but you are right that we could probably support something
similar.

One thing; the converter-registries aren't really bound to modules though 
are they?
They are really just bound to the shared library. So if you have multiple 
modules
in the same shared library you would automatically share registries as well.

---
Daniel Wallin



-------------------------------------------------------
This SF.net email is sponsored by: VM Ware
With VMware you can run multiple operating systems on a single machine.
WITHOUT REBOOTING! Mix Linux / Windows / Novell virtual machines at the
same time. Free trial click here: http://www.vmware.com/wl/offer/345/0
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.