February 01, 2014

Why I love Python so much

I learnt Python in the first year of my college and since then it has become my go-to language for everything. Whenever I have to try out any algorithms or anything else, Python is always my first choice. People sometimes wonder why do I prefer Python over C++/Java so much.

  1. In-built basic data-structures which are very easy to expand.
  2. The open-source spirit in the Python community is very strong.
  3. It’s very easy for a beginner to pick-up Python instead of C/C++ or Java. It even reads like pseudocode.
  4. Indentations. Although, most of my friends in college don’t like to indent their code manually, Python’s indentation restrictions has made me so much habitual of indented code that I personally make it point to indent all code I get from anyone. (Text editors help a lot, too)
  5. PEP - Although they seem as annoying at first, but IMHO it makes the code look very elegant and beautiful. (The apt word would be: readable, of course)
  6. The performance-hit compared to Java or C++ is every penny-worth of the simplicity and awesomeness of Python. When you really need to use all CPU cycles for your time-critical applications, you can always embed C in your scripts.
  7. Batteries
  8. Prototyping is done best in Python. Period.

To the C++ purists: Performance of a programming language should not be the time taken between launching a program and completion of the execution. To me, it is the time since we decide to write a program till the time we become satisfied with what we have written. This is where Python fares above all other languages.