Wednesday, July 9, 2008

Python and C

I don't typically write in C, but lately in my free time at home I have been dabbling in C code. My two favorite dynamic languages are both extensible in C. There have been times my Python code was slow, and I either scrapped the code, or wrote it completely different to avoid the problem entirely. The ability to re-write that method in C would have been handy. This combination gives the quick development time of a dynamic language, and the speed of C. Next time I will be prepared.

Here is a great article for extending ruby in C:
http://www.onlamp.com/pub/a/onlamp/2004/11/18/extending_ruby.html

For Python:
http://docs.python.org/ext/ext.html
and
http://docs.python.org/api/api.html

No comments: