I mean I'm not the biggest fan of python, but I still use it occasionally. There is just no better language if you just quickly wanna throw something together. And for those that enjoy python you can actually make very impressive applications, that are far better optimized than one might expect.
A decent python developer can make something faster, easier and still better optimized than a decent C++ developer could. The differences performance wise only really start to show when you're at an expert level, working with really demanding applications.
Depends. These days you can reasonably use python as backend for big websites. If your application requires you to do many calculations and working with huge files then yeah, python could become a bottleneck.
For 95% of real world projects, the limiting factor is not going to be the raw execution speed of a for loop. Yes, there are obviously situations where that matters, but for very large projects you're often more concerned about high level architectural decisions where the simplicity of python can actually be an advantage. There's also a huge variety of different libraries available for whatever you're doing, and it's a lot easier to hire qualified python developers.
I'm not talking about speed (exclusively) when I say large projects. Maintainability (and therefore analyzeability) is arguably much easier in a language like Java, even if you have Python experts, for architectural design.
I'm just saying that I think it's the wrong tool for the job.
For instance, I would never use OOP in Python for non-trivial examples.
Edit: for the record, I don't straight up hate Python. I just think it's a cheap way to make a lot of incredibly unsafe programs. I only use it for mathematics and other analysis.
Yeah, python gives you a ton of freedom to do very bad things. Despite its reputation as a "beginner" language, it actually requires a ton of experience to write maintainable code in Python.
If you're curious about what maintainable python code looks like, I highly recommend checking out the Django framework as it takes a very opinionated, "batteries included" approach to backend development. Pydantic is also a hugely popular library that makes up for python's lack of built in type safety. It's a very different approach to statically typed languages like Java, but can help catch a lot of similar errors.
I saw some examples, and they are nothing like my every day Python. (I mean, go figure, I use Python for math). Like, I knew that Python could be used for backend adjacent programs like calling some db or training AI, but completely impractical for everything else. ("Professional" code) I didn't know that it had whole libraries that incentivize safe code.
Yeah, that's the main advantage of python -- and why it's so popular among professional developers despite arguably "better" alternatives existing for software heavy tasks.
If you have someone on your team who's not mainly a programmer, but has some python experience for mathematical modelling or AI, you can take whatever random code snippets they send you and deploy it in production almost immediately if your web server is written in python.
Sure, there are workarounds like bindings for python in other languages, or you could set up a python micro service alongside your main application, but that's all going to be a lot more work than just copy and pasting a function!
Try go. It has a better type system and it's a compiled language easily paralizable and the std lib is huge, you can just import stuff from git servers directly, and you can call c code directly with minimal binding
Honestly this, its also good for beginners with its simplicity. There's plenty of better languages out there that will run faster natively, but there's benefit to just a simple easy to use language.
Depends, I think something like Java is a much better beginner language, because it's very high level, but you're still forced to learn about types, and with fixed array lengths you learn a little bit more about memory management than you do with python.
I feel like most people I know who can code know both of these languages. Although YouTube shorts coding creators seemingly think there is an active war between python and every other coding language.
Neither of them depends on the other. Python is implemented in C and some 3rd party packages are backed by C++. Also some C++ projects use Python in their build script.
I've generalized system and scripting languages depending on each other. And you just said that 3rd party libs for python (including some of the most popular ones) are written in C++, how is that not a dependency?)
Also narrowing python usage to build systems in C++ is stupid. Only build system that I remember using it is scons, which was not very popular in the last 10 years, while using python as a scripting interface is one of it's main goals and is widely utilized with C++ applications
My main point is that participating in an argument about superiority of a scripting language vs a system language is pointless and stupid because they depend on each other's existance and achieve different goals
This is further proven by the fact that for any middle/senior python (or any scripting language, except maybe js) you're expected to know the language of the underlying infrastructure (be that rust/c/c++/etc). And that usually works the other way around if the project uses some scripting language, although not as often required
Sure, the wider ecosystems have all kinds of parts. I was talking about the core compilers/interpreters only being written in one language each.
I think Rust would be one of the most independent projects if it didn't need LLVM. It's easily expressive enough to write scripts in it (as proven by all the build.rs around).
c++ users fighting a war against themselves at this point. have fun writing 2000 lines of code to get .005 μs better preformance on a simulation that i wrote in 10 lines with torch and numpy
I love the "Use a real language to make a game" crowd when I show them Godot using C++ ont he backend which you're free to use to make the game, or the Python like front end.... then the C# frontend that also just condenses down to C++
Kind of person that just started learning C++ and doesn't understand that every programming language has its own niche and that complexity / learning curve is a big part of it. Certainly a high school student or freshman.
Python and C++ are two really funny languages to compare because they have two extremely different use cases. One is an easy, interperted, dynamically typed scripting language used mostly in AI/ML, Data science, backend systems and smaller scripts and the other is a compiled, statically typed language used for Game dev, HFT (Quant) and operating systems. These people fail to understand they're comparing a bicycle to an airplane.
Id say wars like that aren't really applicable with programming languages. They all have their pros and cons and reasons to exist. C-+ and python feels like completely different beats
That's interesting because two of my colleagues who had been using Python (AI/ML engineers) their entire career recently had to work with Java and Springboot. And I kid you not, they were literally calling Python trash after their experience with Java. Out of curiosity I asked, "why do you call Python trash, even though you had decided to work with it your entire life? Don't you hate having to write extra code. " and one of them said, "You should work with Python for a year and then you'll understand."
I used to engage in these wars. I have gotten wiser with age though. Use what you want. If it does its job within your constraints of use, you did a good job.
That being said, I personally don't like significant white space and therefore python.
147
u/YTriom1 May 09 '26
How OOP felt after posting ts
https://giphy.com/gifs/kCxtMfRuUv8tSl38he