Object-Oriented Programmers Should Consider Python

By Jason Brown

There hundreds of programming languages out there and most of us don’t have time to learn them all. Ideally we find a few that are comfortable and relevant to our workflow. But at some point in our careers we’re challenged to stretch outside of our comfort zones and embrace a new language.

As an object-oriented programmer, I’ve always gravitated to C++ due partially to it being my first programming language, but mostly due to the fact that object-oriented programming and C++ go hand and hand.

My first experience using Python was shortly after its release. To be honest, it turned me off a bit mainly due to the lines of code being delimited by white-space. And while I did not become an immediate fan, I recognized that Python was growing in popularity. According to IEEE Spectrum’s list of most popular programming languages, Python has become as widely-used as C++ in 2014 (http://spectrum.ieee.org/computing/software/top-10-programming-languages).

And while I understood its wide acceptance by other programming disciplines, I was still not convinced of its usefulness in object-orientated programming.

Recently, I began working on a team of programmers who frequently used Python. Not wanting to be left behind and eager to learn a new language, I decided to focus on Python’s strong points.

Aside from being really easy to learn and use, Python is a solid choice for web development back end since there are great frameworks to use — whether I need to to just get the project up and running quickly (using Flask) or need an extensive library of functionality (available via Pyramid).

More specifically to my world, It also allowed me to easily design every concept as an object and be iterable. Python also makes it simple to condense code. One example of this is list comprehension — which is essentially looping over a group of objects and assigning them to a list. I find this useful because it makes the code more readable and reduces clutter.

Overall, I’ve been using it constantly at my new position and I’m gaining confidence that it’s going to be a great tool for me.

Are you new to using Python? What has your experience been so far?