[C++-sig] Re: Re: sub module support in V2
Dave Hawkes
daveh at cadlink.com
Wed Jun 5 22:40:49 CEST 2002
> Just who are you arguing with here?
I thought I'd start a new trend and start flaming myself...
> BTW, I am not happy about the interface in which sub() chaining introduces
> another level of nesting. I would prefer it if you could find a way to get
> something like this to work:
>
> module("outer")
> .add(
> module("inner1")
> .def(...)
> ...
> )
> .add(
> module("inner2")
> .def(...)
> ...
> )
>
> I realize this is a bit problematic, especially since class_<> instances
> now get their __module__ attribute from the module they are added to. I'm
> just asking you to think about it.
>
Also how do the inner modules get their parent when they are instantiated at
this point? I'll certainly think about it as rough out a first
implementation.
Dave Hawkes
More information about the Cplusplus-sig
mailing list