[SciPy-dev] Numpy/Cython Google Summer of Code project idea

Robert Kern robert.kern@gmail....
Thu Mar 6 20:05:34 CST 2008

On Thu, Mar 6, 2008 at 7:57 PM, Stefan Seefeld <seefeld@sympatico.ca> wrote:
> Robert Kern wrote:
>  > On Thu, Mar 6, 2008 at 7:29 PM, John Ollinger <ollinger@wisc.edu> wrote:
>  >> Fernando,
>  >>
>  >> When I wrap a C package I spend 95% of my time modifying the package to run
>  >> as a library and 5% of the time hand-wrapping it for python.  I find that
>  >> hand-wrapping makes me more aware of the interface than using swig, so I can
>  >> recode portions of the library to make the overall package work better.  A
>  >> quick look at the cyrex documentation makes me wonder if it is primarily
>  >> written for those who haven't written much C-code..  Is this an accurate
>  >> impression?
>  >
>  > No. Using Cython or Pyrex eliminates an enormous amount of the
>  > boilerplate involved in writing a C extension especially when it comes
>  > to implementing types. They are definitely not the same kind of tool
>  > that SWIG is. Instead, they are tools to make hand-wrapping less
>  > painful, perhaps even pleasant.
>  Has any thought been spent on using boost.python for this ? If so, what
>  were / are the arguments against it ?

Well, boost.python certainly had the goal to make hand-wrapping less
painful, but in my experience, it just made it more C++y. If you're
heavily invested in C++ and the advanced features of C++ that the
Boost project uses, then this might be a win for you. For me, it was
just an exchange of unpleasantness. The excessive compile time was the
killer for me; I just couldn't develop quickly enough using it.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless
enigma that is made terrible by our own mad attempt to interpret it as
though it had an underlying truth."
  -- Umberto Eco

More information about the Scipy-dev mailing list