Random thoughts, ideas and experiences

Why Perl, PHP and Python

Off late, I’ve been meddling a lot with Perl, PHP and Python. The next few posts are going to revolve around these three programming languages. I don’t plan on getting too technical as I’d just like to share my experiences with them. Let’s start out with a short list of advantages.

They are all mature programming languages:

  • They have stable implementations.
  • They have a large and active user base.
  • There are innumerable free tutorials, wikis, articles, forums and IRC channels to learn from.
  • There are several published books from reputed authors to refer to.
  • They have almost all the functionality you’d require to develop a decent application.

They are free:

  • The interpreters are free to download and install.
  • Free or commercial applications can be developed without having to pay licensing fees.
  • Documentation is freely available, allowing anybody to become an expert with minimal monetary investment.

They are all interpreted languages:

  • You don’t need to set up your development environment, write complicated make files or set up a build system. Just install the interpreter and you are ready to go.
  • You don’t need to compile your code in order to test it. This allows you to test your code changes quickly while developing your program.

They are cross-platform:

  • You don’t need to write different versions for different platforms and operating systems.
  • Your target audience is much larger simply because the interpreters are so widely ported.

They provide all the common data structures:

  • Strings are finally simple and no longer a pain to manage.
  • Data structures like arrays and hashes are available by default so there’s no need to write your own version or hunt for good implementations.

They have automated garbage collection:

  • Forget balancing your malloc()’s and free()’s, new’s and delete’s.
  • Forget debugging nasty segmentation faults caused by freeing inappropriate memory.

The above points are probably valid for a multitude of compiled and interpreted languages. However, the above list is what has made Perl, PHP and Python very relevant in my bag of tools.

Filed under: Programming

2 Responses

  1. Marc says:

    Yep, all three are useful languages. Ruby also has all of those qualities.

  2. […] It’s good that RoR is getting the attention it has gotten over the past two years of it’s existence. Ruby is a beautiful language and deserves the attention. It’s syntax makes it a very clean and readable language to program in. Being object oriented from ground up, everything is an object, thus making the language consistent and predictable. Lastly, it has all the qualities of PHP, Perl and Python that I described in an earlier post. […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

Twitter Updates

%d bloggers like this: