[SciPy-dev] reimplementation of lfilter

Sturla Molden sturla@molden...
Wed Sep 23 10:07:29 CDT 2009


David Cournapeau skrev:
> It can be a full rewrite, but still should be sent as patches. If I am
> the one to review, I would prefer this way. That's especially
> important to track regressions.
>
>   
Well.. I didn't intend this for inclusion in SciPy, at least not in the 
beginning. I needed it for some neuroscience software I am writing.
> It is a fundamental problem of C++. Different compilers do not
> propagate exceptions the same way, and that's a problem when different
> compilers are involved (happens easily when the C and C++ compilers
> are not the same, for example). That has been a problem on every new
> platform I have tried to port numpy and scipy to.
>   
Does this mean we cannot use g++ to compile extensions at all, when 
Python VM is compiled with MSVC? Or does the rule just apply to the 
particular extension, like C and Fortran runtimes?

I don't like the complexity of C++. But it has some advantages over C 
for scientific computing; notably STL containers, templates for 
generics, the std::complex<> type, and so on. The problem with C++ is 
that it encourages bloat ugly style, and OOP stuff is  etter left in Python.

I personally like exceptions because they remove the need for lot or 
error checking. In C, we can achieve almost the same effect using 
setjmp/longjmp. Is that bad style as well?



Sturla Molden


More information about the Scipy-dev mailing list