Remix.run Logo
frollogaston 2 hours ago

Python's strength is that it's easy to make C libs work in it. That's also why CPython is de facto the only Python implementation and stuff like PyPy never took off.

kccqzy 2 hours ago | parent | next [-]

Yeah and I would say that another important factor is Cython, which compiles Python with minimal modifications to C extensions that can in turn be imported in Python. It really makes it easy to get started in Python and worry about performance of the computation later. (Doesn’t help with concurrency I know but that’s a different story.)

AdieuToLogic 2 hours ago | parent | prev | next [-]

> Python's strength is that it's easy to make C libs work in it.

SWIG[0] makes working with C libraries trivial for over a dozen programming languages; Perl, Python, and Ruby included.

0 - https://www.swig.org/

frollogaston 2 hours ago | parent [-]

There are reasons all those Py libraries with C code didn't just do it in SWIG.

dismalaf 2 hours ago | parent | prev [-]

Ruby can interface with C (or Odin, or anything that can export C style functions) just as easily.