HACKER Q&A
📣 _bxg1

What are the motivators for back-end Python, compared to Node?


I've done a good amount of JS and only a smattering of Python. The two languages obviously have a lot in common:

- Fully dynamic

- Convenient dict/array primitives and list comprehension features

- Optional static type systems

- Vibrant library ecosystems

But for web servers, JS has a leg up: native understanding of the web's primary data transfer protocol, and even the potential for code-sharing with the front end.

Which makes me wonder: what is it about Python that inspires many to use it instead, when it comes to web servers? Is Django just that amazing? Is Python meaningfully more performant? Just personal preference?


  👤 cyberpanther Accepted Answer ✓
For me it's Django. It's a mature framework but also gives you plenty of ways to customize and configure for your usecase.

However, another might be the libraries. If you have to implement machine learning or data analysis on your backend, you would probably be better suited with Python. There are also probably other of examples of this too. Python is a more mature language on the backend so I would guess it has a bigger ecosystem there.

I think out of the box JS is more performant. However, you can make Python good enough.


👤 uberman
I personally detest any language where whitespace is significant, but if you are not fluent in js async/await then python does offer a more traditional paradigm.

Not knowing a thing about python, I was able to get a non-trivial Flask app running in a day. I'm not sure that not knowing anything about node/js the same could be said for Express.

Your mileage may vary.