r/learnpython • • Jun 28 '20

Can anyone explain why we use Python

I keep reading people say things like ‘because Python is built on C’ and ‘Python is much slower than C++ or Go’, ‘Thats why those languages are used to make most popular games’. I also see people refer to Python as a ‘machine’ language, etc etc. So... why use python then if you can do things faster with another language? And why is Python so popular if this is the case? Seems like python is easier to understand for me at least and much easier to read, but is there some other benefit I’m not understanding? Sorry if this had been asked before, I can’t find any direct comparison information between Python and other languages.

EDIT: Thanks everyone! I feel a much better understanding of why python is fast in a different way from other languages, saving programming time rather than computing time. Definitely got the answers I was looking for.

Another edit: Great insights all around. Thanks to everyone taking the time to answer! Looks like I need to do some more research on Cython as I see a few people mentioning it for when speed is required.

336 Upvotes

120 comments sorted by

View all comments

Show parent comments

5

u/PricePadraic Jun 29 '20

Didn’t know that, thank you for the Info! Is there any other language that stands with python or above python in its scalability?

4

u/[deleted] Jun 29 '20

That's a hard question to answer. Most of the popular languages are highly scalable and responsible for some huge monolithic applications.

You might be surprised to find how many critical systems, especially in the insurance, pensions and.finance industry are written in COBOL. Even if they have been hidden from view, wrapped in modern clothing

So much of the modern application landscape is really a complex enterprise architecture of inter-dependent systems written in a variety of languages.

The obvious candidate is Java, hugely popular for corporate work. Also, historically the primary app language for Android (now replaced with Kotlin). Scala has become very popular (it typically runs on the same Java Virtual machine as Java).

JavaScript, especially server side, such as node.js, is very common these days, especially for web front ends and APIs.

C has to be king though although even Microsoft are looking to moving away from it and its variants with candidates such as Rust looking good.

Modern AAA games tend to.be written in C++ (and C#), which has significant development benefits over C for a small performance penalty.

So the answer is, it depends.

2

u/PricePadraic Jun 29 '20

Thank you for the elaboration. You seem to know your stuff despite calling yourself a ‘hobbyist’. Appreciate the info.

2

u/[deleted] Jun 29 '20

The hobbyist tag applies to my skills in Python and my use of it for my personal interests.

I've been a senior IT professional for decades, leading teams at times of well over 100 people in multiple countries on major enterprise system developments, integrations and implementations. I was a professional programmer a very long time ago, using assembly language and Fortran.

I gave up living in hotels and flying around all the time for a better work life balance so had time for hobbies. They included learning to programme again and taking up electronics.

I am though still working, now for a large government department, and am responsible for on premise and private cloud hosting as well as being part of strategy team for public cloud usage.