[PyKDE] Heirarchy of header files !!

Jim Bublitz jbublitz at nwinternet.com
Fri Aug 15 06:51:01 BST 2003


On Thursday August 14 2003 18:27, Paul F. Kunz wrote:
>    Unless you need to interface to PyQt, I would recommend
> that you do NOT use SIP.  SIP is completely undocumented and
> does some pretty wierd things.  I'm probably biased just after
> spending three full days trying to get something to work, but
> I find SIP violates one of C++'s strenghts: "If it compiles
> and links, there's probably not going to be any run time
> errors".  With SIP run time errors can easily happen and it
> reminds me of days I used to program in Fortran.

If run time errors were rare, none of us would bother testing 
code. Especially in C++.

I would agree that 3 days is probably not going be sufficient to 
learn to apply sip, just like three days probably isn't 
sufficient to learn a new language or to learn any fairly 
complex tool. I've looked at lex/yacc any number of times over 
the past 15 years and still have no clue as to using or 
understanding them. They have reams of docs too (I have the 
O'Reilly book).  Doesn't mean they're not useful tools for the 
right person and application. I also spent 5 or 6 hours getting 
sgmltools set up on a new installation today. sgmltools has tons 
of docs and it's still a pain in the ass, but it's still useful 
to me too.

>    Try Boost.Python or SWIG.  I've used Boost.Python for the
> same C++ code that I've used with SIP.  In spite of the very
> difficult to understand error messages when I mess up, at
> least when it compiles and links, it almost always runs.

Boost and SWIG both appear to be good approaches for some 
problems. sip has a lot of advantages that outweigh the 
difficulties in using it in a lot of circumstances, especially 
for larger or more dynamic situations. For example, I know of 
several projects doing Qt bindings for different languages, and 
none of them use SWIG (they could in theory) - in fact they're 
spending months developing their own tools.

Jim




More information about the PyQt mailing list