[pypy-dev] Why CFFI is not useful - need direct ABI access 4 humans

anatoly techtonik techtonik at gmail.com
Sun Mar 30 11:05:06 CEST 2014


On Sat, Mar 29, 2014 at 3:58 PM, Markus Unterwaditzer
<markus at unterwaditzer.net> wrote:
> On Sat, Mar 29, 2014 at 02:49:00PM +0300, anatoly techtonik wrote:
>> I know what C in CFFI stands for C way of doing things, so
>> I hope people won't try to defend that position and instead
>> try to think about what if we have to re-engineer ABI access
>> from scratch, for explicit and obvious debug binary interface.
>>
>>
>> CFFI is not useful for Python programmers and here is why.
>>
>> The primary reason is that it requires you to know C.
>
> You're using C if you're calling it from Python. Knowing the language (to some
> degree) when using it is inevitable.

This is the problem that I've tried to describe:

     All standard Python tools for ABI level access require C knowledge.

>> And knowing C requires you to know about OS architecture.
>
> The PyPy team (especially fijal) has always strongly discouraged from
> porting Python code to C for performance. If you have a good reason to use C,
> it is not surprising that you're going to be confronted with the dangers of
> such a language. I am not sure if you're trying to make a point against C or
> CFFI here.

Against C. As I said, CFFI is good, but not enough to work conveniently with
binary interfaces, and the reason for that is that it is C-centric.

I support fijal - my position is that rewriting the same code in faster language
is not a way to solve performance problems. Language as a problem is a
failed smoke test for app architecture.

> I am also not sure if the rest of your post actually means anything, or if it
> is just way above my head. But given that you're throwing around with
> statements like "this is useless", i don't feel compelled or motivated to try
> to understand your ramblings.

Fair point. Thanks for the feedback. Sometimes I feel like I should just stop
wasting my time on ideas, and start eating some pills so that I could better
concentrate on a mindless coding.
-- 
anatoly t.


More information about the pypy-dev mailing list