DEV Community

Discussion on: Why all this hate about Python?

 
evanoman profile image
Evan Oman

Java + Gradle (or any of the major build tools) = 😍😍😍😍😍

Thread Thread
 
scottanderson42 profile image
scottanderson42 • Edited

"But why even try when there's no real benefit? The language is still very slow when compared to any compiled statically typed language."

Because straight-line execution performance is, for most applications, far less important than architecture and team productivity. For a web site, caching, CDNs, and concurrent processing will take you much further than your language choice will (within reason: don't write your web site using DOS batch, please). Python is Fast Enough. And when it isn't, it's very good at calling your favorite compiled code for performance sensitive pieces.

Additionally, it can be far more productive than a language like straight Java.

"What I generally dislike is the way Python handles libraries in general - with them being global and all. It creates mess, with one project requiring 1 version of a library and another project another - what do you do?
The libraries are global, and it affects ALL of your projects at once."

You use virtualenv, as it is the tool that was created specifically to address project-specific libraries. Global libraries are a solved problem.

"Another problem is that should I create a Python project and want to release it on production, I need to NOT ONLY install Python, but pip with every dependency as well, at a global scope.
With Java - I can compile the my project to include the libraries I use. I need only the JRE on production, and I'm golden :D"

As above, no, you do not need to install these at global scope. In fact, you can run different versions of Python with different projects in the same scope as well. J2EE can have more of a problem with global system libraries (remember log4j vs. commons logging in Tomcat?) than does Python.

"For the very least - I despise Python on a project level. A lot of things can go horribly wrong, and a great level of discipline is required to make the most out of it."

Great discipline is required with every language to make the most out of it. Python is no different here.

"I work at place where people use Python only because they needed to get things done QUICK."

Yes, that is a very real benefit of Python.

"They didn't have discipline.
And I'm the one that suffers all of their horrible, horrible choices.
So yeah, more often than not I'm more scarred fron the misuse of Python than anything else."

This again is not a Python problem, it's a management and team problem.

Thread Thread
 
krudflinger profile image
Clay Kuppinger

Pyenv + pipx + pipenv for all projects.