We are working on Arabic Natural Language Processing project, we have limited our choices to either write the code in Python or C++ (and Boost library). We are thinking of these points:
-
Python
- Slower than C++ (There is ongoing work to make Python faster)
- Better UTF8 support
- Faster in writing tests and trying different algorithms
-
C++
- Faster than Python
- Familiar code, every programmer knows C or C-like code
After the project is done, it should be not very hard to port the project to another programming languages.
What do you think is better and suitable for the project?
Write it in Python, profile it, and if you need to speed parts of it up, write them in C++. Python and C++ are similar enough that the “familiar” advantage with C++ will be irrelevant pretty quick.
I say this as someone who has developed primarily in C++ and has recently gotten serious with Python. I like them both, but I can get Python code working a lot faster than C++. Seriously,
dictbeatsstd::mapin usability.P.S. Here’s some information on how to call C code from Python.