December 05, 2019

Is Python the best programming language?

For creating a prototype, Python is for sure the best programming language. It supports powerful object-oriented features, produces only a small amount of syntax errors and can be typed into a IDE very fast.

If the problem is not to create only a prototype but program the final production ready code, Python is poor choice. For web development, Javascript and PHP are more often used. The simple reason is, that a normal webbrowser can run embedded Javascript programs but no Python. For creating desktop applications, the C++ and C# languages are frequently used, because they can be executed very efficient on current hardware, and for low level operating system programming the C language is a here to stay.

That means, Python didn't replaced the other programming languages, but it provides an additional layer for fast creation of a prototype. No matter if a new game, a new desktop application or a new server application should be created, the first step has to do with preparing the prototype in Python. Only in the second step, the prototype gets converted into a more efficient language. What is interesting to know, that the transformation of existing Python code in one of the other languages is an easy to solve task. Efficient programming projects are working with a combination of a prototypes and production ready code. If no production ready code is needed because the prototype is thrown away after some failed tests, the Python language makes it easy to write such code snippets.

Python as a higher layer

The most interesting feature of Python is, that it can be used for testing out algorithm which can be later implemented in more efficient programming languages like C. The advantage of C is, that the language compiles into the fastest possible binary code. And exactly this speed is needed for modern desktop applications and operating systems. The disadvantage of C is, that the language is difficult to program. It was designed for a machine but not for humans. Python is the opposite of C. Programming in Python is easier than in most other language. Python is even easier to master than Visual basic and the Logo language which were both designed as beginner friendly education languages.

The interesting question is how to convert an algorithm which was realized in Python into a more professional language like C? The programmer needs to understand both languages, he has to be familiar in Python and in C. This allows to reprogram an existing algorithm. This reprogramming of code isn't a waste of time, but it's the fastest possible way in creating software. It combines the strength of Python with the power of C.

A second fact is, that most programming project doesn't need to convert into C or into C++ because the initial prototype isn't working well enough. The programmer has written some lines of code in Python, has recognized that the project has failed and decides to cancel the project. With Python as a programming language, it's very easy to step a project, because the invested amount of time was low. After a while a team or a single programmer has created lots of failed projects which are stored on the harddrive and do nothing but prove that the idea was wrong. It's important to iterate such a workflow over and over again. If somebody has created 10 failed Python project, he needs to double his efforts. This is the only way in become familiar with programming in general.

No comments:

Post a Comment