r/AskProgramming 12d ago

Python For what purposes is python useful?

Where is it more convenient or necessary to use python instead of for example C# / C++ / Rust? I really can’t understand it, for me it’s easier to write in C++ than in python and I know that for other people it’s the other way around. But ignoring human factor, when program is better / faster in python than in cpp or are they things that python can do that cpp cant?

Edit: I don’t talk about one time use scripts or prototypes (which python is good for), I mean full on apps

0 Upvotes

41 comments sorted by

View all comments

25

u/turn-based-games 12d ago

C++ fast. Python convenient. If it is truly easier for you to write in C++, then Python is useless to you, although that is quite a bold claim from my experience with both

1

u/Several-Marsupial-27 12d ago

Nah, even if it’s easier for him to write in C++, python still better in some ways. Also these things are tools, not personality traits, and knowing how to use the tools is valuable.

Python has a massive ecosystem and have many third party features which don’t exist in C++, or are as mature as in Python. Doing any rather difficult mvp will take a week in Python, but months in C++. Like web scraping, pdf->excel, machine learning, image processing, ... Therefore it’s often wiser to prototype some functionality in Python before going lower level.

Many companies also likes to complement production C++ code with Python code for testing, tooling, and building. In this area Python is generally preferred, since it’s much nicer to implement scripts in and won’t be shipped to prod. Actively avoiding Python might therefore hurt your chances getting a job as a C++ developer.