Hacker News new | ask | show | jobs
by revelio 1172 days ago
Native library interfacing isn't really Python's strong suit, interpreter plugins are quite painful to write.

.NET has P/Invoke which is much nicer.

JVM is getting Panama+jextract, which is the nicest yet. You can go straight from header files to pure Java bindings which don't need any extra native code at all. But it's not shipped yet :(

2 comments

What is an “interpreter plugin?” Writing a Python C extension is not that painful, it’s quite well supported. And you’ve got cffi and ctypes as well.
Python has had cffi since figuratively forever, so I’m not sure why you compare native modules to P/Invoke?
Most important libraries with native components are using C extensions, not cffi.