Python Logo

Why try Python first?

As an IT guy, I get it. Learning a programming language can be daunting from an outside view. However, I feel that everyone in today's age should learn a language at some point. I hold this opinion due to how useful it can be in my daily life.

Although everyone who knows how to program has a recommendation on which language to learn first, I'm a strong advocate for the first language someone learns to be Python. I'll get into some of my reasons for this here.

Syntax

Python's syntax is easier than lower level languages. For example, here's a while true loop in Python.

while True:
    # Do Something

Let's see what some other languages have for a while true loop.

C++ requires

while (true) {
   # Do Something
}

Java needs

do {
    # Do Something
} while (true)

This is a great feature of Python for people just starting to learn programming. New learners don't need to worry about adding curly braces. It's easy to forget to add syntactical necessities in other languages, but it's easier to "just get it right" in Python due to a simpler overall syntax.

Furthermore, Python is great for less seasoned programmers due to the assumption that the end of a line is the end of a function call. There's no need in Python to end every line with a ;, as it's assumed by the language.

Variable Types

In most programming languages, you have to specify variable types on your own. There's no need in Python to specifically declare whether you're wanting a char, char16_t, char32_t, wchar_t, float, double, signed char, unsigned char, etc.

Python keeps it simple for newer programmers by allowing variables to be assigned and used like so:

text = "This is an example!"
print(text)

Popularity

Although I sometimes have the gripe that something being popular, doesn't make it good, it's a fact that there are benefits to using something popular.

Using a popular language allows the most people to be able to help you, as more people understand the language. Furthermore, there are more guides and examples written about it, as there's more of a want for them.

Extensibility

Some people will complain about a lack of "native function calls", and I can see where they're coming from. Unfortunately, this gripe is typically due to a lack of knowledge about Cython, which allows the use of native C function calls, along with the other benefits of using C (such as performance).

The Python Package Index has tons of packages made by the community for almost everything one may need their program to be able to do. This is extremely useful for speeding up development time, as people do not have to develop many things on their own. For example, TensorFlow, a tool for deep learning neural networks, has a fully developed PyPi package, so that nobody has to build their own hooking framework for TensorFlow on their own.

Wrapping Up

Due to these factors, and many more, Python is a great choice for both seasoned developers, and people looking to learn their first programming language. The minor points that I've addressed in this article add up to faster development times, and easier maintainability of a code base.

Leave a Reply