On 2012/12/04 12:07 PM, Damon McDougall wrote:
> On Mon, Dec 3, 2012 at 12:12 PM, Chris Barker - NOAA Federal
> <chris.bar...@noaa.gov> wrote:
>> generated code is ugly and hard to maintain, it is not designed to be
>> human-readable, and we wouldn't get the advantages of bug-fixes
>> further development in Cython.
>
> As far as I'm concerned, this is an argument against Cython.

Nonsense.  It is an argument against the idea of maintaining the 
generated code directly, rather than maintaining the cython source code 
and regenerating the C code as needed.  That idea never made any sense 
in the first place.  I doubt that anyone follows it.  Chris already 
pointed this out.  Would you maintain the assembly code generated by 
your C++ compiler?  Do you consider the fact that this is unreadable and 
unmaintainable a reason to avoid using that compiler, and instead to 
code directly in assembly?

>
> I've had to touch the C/C++/ObjC codebase. It was not automatically
> generated by Cython and it's not that hard to read. There's almost
> certainly a C/C++/ObjC expert around to help out. There's almost
> certainly Cython experts to help out, too. There is almost certainly
> *not* an expert in Cython-generated C code that is hard to read.
>

There doesn't need to be.

> I vote raw Python/C API. Managing reference counters is not the
> mundane task pythonistas make it out to be, in my opinion. If you know
> ObjC, you've had to do your own reference counting. If you know C,
> you've had to do your own memory management. If you know C++, you've
> had to do your own new/delete (or destructor) management. I agree not
> having to worry about reference counting is nice positive, but I don't
> think it outweighs the negatives.

You have completely misrepresented the negatives.

>
> It seems to me that Cython is a 'middle-man' tool, with the added
> downside of hard-to-maintain under-code.
>

Please, if you don't use Cython yourself, and therefore don't know it 
well, refrain from these sorts of criticisms.  In normal cython use, one 
*never* modifies the code it generates.  In developing with cython, one 
*might* read this code to find out what is going on, and especially to 
find out whether one inadvertently triggered a call to the python API by 
forgetting to declare a variable, for example.  This is pretty easy, 
because the comments in the generated code show exactly which source 
line has generated each chunk of generated code.  Context is included. 
It is very nicely done.

Eric

------------------------------------------------------------------------------
LogMeIn Rescue: Anywhere, Anytime Remote support for IT. Free Trial
Remotely access PCs and mobile devices and provide instant support
Improve your efficiency, and focus on delivering more value-add services
Discover what IT Professionals Know. Rescue delivers
http://p.sf.net/sfu/logmein_12329d2d
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to