Language Wars - PHP, Python, Ruby
Language Wars - PHP, Python, Ruby
Written by Mike James   
Saturday, 11 February 2012

Want to start an argument? Simply say any one of the three languages, Python, Ruby, PHP, is the best. Programmers tend to be very fixed in their language preferences and very ready to recommend their favorite to you.

I wouldn't really say it was war, but these three languages present a real dilemma when you are trying to choose. They are all what you might call "modern languages", they share a lot in common, but they also have distinct characters and motivations.

The main similarity from a technical point of view is that they are all dynamic object oriented languages. They are mostly encountered in the wild as interpreted languages, although you may find the occasional compiler if you look hard enough. They are also open source, free to use, and not really backed by a big company - with the possible exception of PHP and Zend.

So why invent a new language?

The answer is basically because people found that the existing languages didn't do what they want. Over time other people agreed and joined in the effort to create and use something new. This is one way language creation works; the other is that big companies decide that their best interests are served by introducing a new language - Sun and Java, Microsoft and C#, Google and Dart and Go.

So why three languages? Are they so very different?

The truth is, and here I am inciting wrath from each of the three camps. there isn't that much difference.

They are all dynamic, object-oriented languages - even if PHP had to evolve to become so. They all do things in a very similar way, with perhaps one or two differences that seem important to their aficionados.

PHP is possibly the outlier in that it really isn't an elegant language. It has been retro fitted with lots of things to attempt to make it elegant, but... it still isn't. However, it is a very practical language and you can use to to create server-side generated web pages very easily.

Both Python and Ruby were better designed from the outset than PHP, but they don't occupy the position of the essential server side language. They would both like to, with Ruby and Ruby on Rails putting up the biggest effort to be so.

Python's main claim to fame is the way that everything is an object and program layout influences meaning. Yes, it matters how you indent a program as this determines what constitutes a block of code.

Ruby is similar to Python but with some interesting extras such as code blocks and facilities that allow runtime code modification. This makes it fairly easy to implement language extensions and "meta" programming in general. 

More information to fuel the debate is included in Udemy's infographic:

Click to enlarge


This chart is originally from (click link for hi-res version of the chart) where you can find online courses on programming languages.

So which of the three do you choose?

In many cases the choice is outside of your control. For example, if you want to work with a LAMP-based website then PHP is really your only easy choice. If you want to create a Rails website then Ruby it is. Python is much more of a free choice, in that there are no major infrastructure that forces you into its grasp. You will, however, find lots of areas where Python is commonplace - natural language processing, some areas of AI and so on. Apart from this you are really left with the flavour you like best.




More Information


Related Articles

Getting Started with Python

The Top Languages of 2011

History of Programming Languages (Infographic)






or email your comment to:


To be informed about new articles on I Programmer, subscribe to the RSS feed, follow us on Google+, Twitter, Linkedin or Facebook or sign up for our weekly newsletter.



Android Things 1.0 Released - Too Secure To Be Successful?

Whoever gets to control a large chunk of the IoT market will get a lot of power and presumably profit. Android Things 1.0 is Google's offering and it emphasizes security. But is it possible to have to [ ... ]

Udacity Kotlin BootCamp for Programmers

Undoubtedly there is a lot of hype surrounding the new kid on the block, Kotlin. Even so, it is currently welcoming ever increasing waves of Java migrants to the extent that starting out with Java for [ ... ]

More News

Last Updated ( Sunday, 12 February 2012 )

RSS feed of news items only
I Programmer News
Copyright © 2018 All Rights Reserved.
Joomla! is Free Software released under the GNU/GPL License.