3 ms·
I like C, and I love Python. Python programmers already found a good solution to this conflict, rewrite slow code in C, write the rest in Python. And they do th
by pavelludiq 18y ago
I like C, and I love Python. Python programmers already found a good solution to this conflict, rewrite slow code in C, write the rest in Python. And they do this not because they are not macho enough to write it all in C, but because that way they can have all the advantages of fast code and useful abstractions. C is just as useful as Python, just not for the same things.
- ezy 18y agoI hear this often, and I'd love for this to be true, but python needs it's GIL to be removed for this to be the case. In particular, doing this with reasonable performance in a multi-threaded app (which is most of them these days), is basically impossible. At the level of one-shot scripts calling C code, or event driven apps where there is an entirely separate C component running in parallel -- it works for the most part. But with the most well-supported versions of python, you cannot have various python/C mixtures running in parallel without a lot of annoying (inefficient) legwork. It's not a generally suitable solution, unfortunately.