I find myself, again, thinking about what language is best suited for multi-platform development. Clearly there is no one single winner. So I decided to try and do comparisons. This is my personal log. It is doomed to reflect my prejudice, even though I try hard to be impartial.
My current spot is on PHP vs Python. Imagine this. I run a small start-up company. It builds a web based product. The product is good in it own right, but allows other people to write plugins to it. Some plugins are web based as well. Some are mobile apps. Some are desktop apps. I want to encourage 3rd party developers to build plugins, because it cements my ecosystem. My developers are good. They are fast to learn and can do either PHP or Python or both. They can do Ruby, Java, .NET or Perl. They can do anything. What is the setup that is ideal?
First there is nothing particularly wrong with either. You can be successful doing web dev with either.
Goolge is heavy on Python. Facebook is a PHP shop, for the most part. So either language is fine. But fine is a dirty word in the quest for the best.
Python advocacy is here http://www.infernodevelopment.com/python-becoming-most-popular-programming-language.
PHP has a lot going for it. It is easy to get started with. It is easy write web UI in. PHP is popular. That means readily available workforce. TEOBE ranks PHP having twice Python popularity, on par with C#. There is Eclipse configuration build specifically for PHP, but not one built for Python. Since my hypothetical company is web, PHP seems to be the perfect match.
Python is said to be more “elegant”. It is difficult to quantify. Disregard this argument. Wait. Python 3.0 is not compatible with Python 2.5. While this is pain in the ass, because Python 2.5 had accumulated a lot of useful libraries, the willingness to start client says something about what language designers care about. Python is thought out language. We know who designed it, we know what make them to design it like this. Decision to break with the past is not something that is done lightly. It could have done because the past was a failure. That is why we have Windows Phone 7 incompatible with Windows Mobile 6.X. Python 2.* was and is popular. Decision to start fresh has to do with the relentless quest for elegance and well, perfection. So while weither or not Python is elegant, there is an attempt to have it that way.
The killer for me, however, is that Python is versatile. PHP runs on the web server. Python runs on web back end, on desktop and on Nokia s60 phones. It comes preinstalled on Macs. It runs even in the browser (Iron Python in Silverlight). It scripts 3d game engine Panda3D.
This versatility means that python is not just for the core web applications for my company. It is for reference code for plugins. It can serve my system administrator instead of csh scripts. It can be one language for everything.
C# is like this. Java is like this. PHP is NOT like this. May be I shall choose the best tools for each platform and HTML5 will end up being better then IronPython Silverlight for my web plugin. But if I find myself in a multi-platform situation, especially when I need to create an ecosystem, I find Python a convincing choice.
Web server code is difficult to debug. The fact I can debug most of the code in a desktop application is a huge benefit for me.
Filed under: Blogroll