Python is great

delta

I have fallen in love with several programming languages in the past, with C++ being the most dominate of them.

During the last years though, I have become a Python fan boy, trying to use it as much as I can, something that translates to use it almost everywhere except the rare cases that I have to rely to C++ strictly for performance reasons.

A programming language can be characterized by the following attributes:

–      Expressibility

–      Standard library

–      Performance

–      Metaprogramming

–      Community base, maturity and future potential

The ability to express algorithms classifies a language as imperative or declarative…  A good example of an imperative language is C while SQL in the other hand is another good example of a declarative one.

Imperative languages tend to be verbose limiting their expessibility by polluting the code with low level details while declarative ones are allowing the programmer to be produce more compact code that is both easier to understand and write.

Python expressibility is one of the best someone can imagine. It’s collection classes (list, set, tuple and dictionary) that are part of the language are very flexible and intuitive to use even for the beginner while the dynamic nature of the language makes possible lots of programming tricks that greatly simplify the way the code is written. For example the return value of a function can be of any type; something than in C++ jargon can be expressed as polymorphism by return type. This feature can greatly simplify cases where we need to return objects of not know type to the caller for example a type agnostic factory function or in combination of the fact that we can actually return from a function any number of values as opposed to only one in traditional statically linked languages we can simplify cases where we need to pass some variables by reference with the intention to actually change its value… Overall when it comes to expressibility I am convinced that Python scores much higher than any other language I have already used and this includes C, C++, C#, Java, Basic, Pascal, JavaScript and SQL to name a few….

 

The Standard library of a language is another critical factor I am considering when choosing a programming language. No matter how expressive or fast a language is without a sufficiently extensive standard library will have to rely to third party implementations for things like data base access, XML parsing and network programming.  Although from a purely theoretical perspective such an approach keeps the language lean propagating responsibility to third parties, which can either be an individual developer, a software development company or even the open source community, it is proven that such an approach might lead to a non standardized platform that suffers from multiple implementations resolving the same concept following slightly different approaches.  This pluralism can lead to purely written documented and supported interfaces that in many cases can be accounted for the failure of a well designed language to gain popularity as for example happened to LISP and SCHEME.

Python’s Standard Library is very comprehensive and it design fits perfectly with its spirit while has almost the same feeling across the board…  It covers data base, flat files, csv, xml, Unicode and almost everything that can be considered a ‘standard’ need minimizing the need for custom development.. The concept of a complete standard library is such a fundamental ‘pythonic’ concept that was nicked named as ‘batteries included’.

Be the first to comment

Leave a Reply

Your email address will not be published.


*