Ask HN: Why use any other languages when Python can do the job?
Hi all,
Python is becoming one of the most popular languages. And with all the backing from big corporations, it will only get faster and more ecosystem. Even when performance matters, the worst case is to write a small bit of your application in Go/Rust/C.
If you are creating a new product today, why would you not choose Python?
11 comments
[ 3.2 ms ] story [ 149 ms ] threadHowever, there are many cases where it can't do the job, and in those cases, the question is obviously, because it can't do the job.
I won't entertain you with a list (and following nitpicky discussion on why I'm wrong about every single item on it) of cases where it won't do the job.
E.g.: I'm developing a software (python + django) that need a component to run on multiple OS (mostly linux but also windows and some unix) that I can't directly control. I'm learning golang for this specific purpose because doing this in python is just insane.
We all say choose the tools best for the job or those that work for you. But the fact is that different tools can do the same job and can work for you. Like I want to build a simple API backend, I can code in Python, Elixir, Go, Rust, Clojure Typescript, OCaml and F#. What should I do then?
My point here is for general-purpose applications, and you know a few programming languages pretty well, it seems choosing Python is the more sensible.
Which is kinda sad, really.
Are you trying to grow a team? Still arguable to choose whatever you are best at because you can grow that team.
the elephant in the room: semantic spaces...was an issue on day one...will be an issue the rest of its time
No type safety.
GIL (yes, they are working on it).
Slow execution.
Terrible packaging and deployment: should you use pip, pipenv, poetry, conda, setuptools, hatch, micropipenv, PDM, pip-tools, ActiveState platform, homebrew, or your Linux / BSD distro's package manager? "One way to do it"? Nope, it's TIMTOWTDI.
When writing anything new, I have been mainly choosing Rust and Go:
Rust when performance is critical, type safety is important, work is low-level, or the project is expected to be big or long-lasting.
Go for easy, cross-platform "scripting": standard library does most of what is needed. Super-fast build. Easy deployment with just a binary. Can even embed files if needed.
I am not denying any other languages have better toolings. But you cannot beat the ecosystem. Every project you interact with, they'd have a Python SDK, but others may not be guaranteed.
And I am thinking more about developing Sass products. There are performance-sensitive bit, but there is also big part of your application that is not.
And I would say most products can be developed in many languages, and they will perform just fine.
So Python's ecosystem saves you time and money to write your own lib because certain things you want to use do not have an SDK in your chosen language.
All tools have advantages and disadvantages which make them better suited for some types of work and less well suited for others.