[C++-sig] Re: Refactoring, Compilation Speed, Pyste, Lua/Ruby/JavaScript...

David Abrahams dave at boost-consulting.com
Tue Jun 17 16:32:56 CEST 2003


"Brett Calcott" <brett.calcott at paradise.net.nz> writes:

>>
>>    converter - This stuff which handles Python-specific conversion
>>      mechanics is mostly already segregated in boost/python/converter,
>>      but it could be better organized.  Almost everything else in the
>>      library is built upon these capabilities
>>
>
> As somebody who has tried to go through the library, this bit is the
> part I'd really like to understand. I'm sure the reorganisation
> would help, but I'd really love to read a short doc on how this
> actually all hangs together. The registry, how the templates
> automates the construction of the PyObject and Type, how conversions
> are looked up (what's that graph stuff in there?).

The graph stuff is not in this layer, it's in the core.  It
implements something like this:

    dst_ptr = dynamic_cast(src_void_ptr, src_type_id, dst_type_id)

> Though brilliant, the combination of templates and preprocessor makes it
> really (really, really) hard going. I've read through a fair bit of c/c++
> code before, and I can say that this stuff is the hardest I've ever tried to
> decipher - and I know it is well written, not like most of the other stuff
> I've looked at. Even stepping through it in the debugger is not that
> enlightening.
>
> I think I could use the library better and assist more in extending it if I
> could put all the bits together in my head.(I have in mind something like
> the big text file that Joel wrote for Phoenix.)
>
> Just putting in a bid for your time Dave...

Well, I'd be happy to collaborate with you on an implementation
document.  It's not something I can afford to do by myself, in part
because I don't know what questions to answer.  If you would agree to
have a conversation with me about it here, and from that create a
RestructuredText document which we'll include in the CVS, I'd be more
than happy to type out details at length.  I think you might have to
dig into the code a little, too.  Deal?

-- 
Dave Abrahams
Boost Consulting
www.boost-consulting.com





More information about the Cplusplus-sig mailing list