Having programming experience that spans 20+ years, I was watching the popularity rise for Python.  Already being proficient in other versatile script oriented languages that also includes some archaic UI library integrations, why should I bother with placing Python in my arsenal?  I could see that those whose experience base in the C oriented languages could to rapidly learn a C-like language such as Python without requiring compilation before execution.  I dug in to get a feel for the language and discern how it differentiates with the other languages I already learned.  

 In my view, here are the advantages and disadvantages I see:

Advantages:

  • "Everything is an object".  A good design feature that provides a lot of flexibility.  Object orientation isn't an afterthought as in Perl.
  • Base implementation includes a healthy set of extensions/modules.  Modules are independent from main executable "shell".  There is no bloat on execution; loading of modules are dynamic.
  • Runs on multiple platforms using the same code.  Although I've noticed that there are some limitations when referencing external file names.  The backend of the language seem to bridge against other platform differences such as subtleties in math operations.
  • Good RAD tool to use when having to prototype.
  • Provides wrapper into existing C/C+ libraries.  There is no need for reinventing code.
  • Well documented with a number of tutorials and books to train a new developer.
  • Memory cleanup is handled internally unlike other languages such as C/C+/Java where you have to manage yourself in the code.

Disadvantages:

  •  Variable typing can be onerous.  Typing is determined when a variable is created.  You have to referentially use a utility function to force typing when referenced.
  • Base language code isn't truly "open source".  As Linux is owned by Linus Torvald, Python is owned by Guido van Rossum and he controls the architecture and development of the base code.  Each extension has its own licensing/ownership.

Both an advantage or a disadvantage:

  • Forces developer to maintain readability.  The notion for strict indentation as a feature for organizing code.  Some would see this as a disadvantage.  For those who practice the discipline of readability, this winds up being an advantage.  Forcing readability eliminates the need for eliminates the need for statement terminators.
  • This is just a personal thing, but I like the dot notation for traversing objects as opposed to Perl's "bless" and "->" delimiter.  Perlers would likely argue here.

Aside from understanding the syntax nuances, working with regular expressions and matching seemed temperamental.  Lastly, there is no switch/case feature for executing a block of code.  There is a workaround for defining a data dictionary inside a subroutine that accepts an argument and returns a value based on the argument parmed in.  In this workaround, if you have a block of code to execute, you'd have to add additional code to execute it outside/in addition to the "switch" subroutine.  Klunky at best.  Aside to these exceptions, I really like Python and is a suitable tool to use for both light and heavy duty development.  In putting python to use in the real world, I particularly liked its integration with the GTK library for developing a graphical interface to be used by non-technical types.  

My son is in college working toward an IT degree.  The first language the University taught was Python.  I was surprised that they didn't start with a shell or Visual Basic to teach the rudiments for programming.  Watching him go through the course, I realized that Python was a really good modern programming tool to teach students the rudiments for both basic logic as well as simple object orientation.  Also, the school doesn't have to conform to a single OS platform for it as well.

Tuesday 18th of February 2020 -  Copyright 2016 Allan Wolfe