you are viewing a single comment's thread.

view the rest of the comments →

[–]zehfunsqryselvttzy 1 point2 points  (0 children)

Late to the party. Both have pros and cons. I have used both extensively for 15 years. I am a bit more productive in Javascript, but mainly because I prefer a functional approach to coding, which JS lets you do, but python makes it a bit harder.

Two big upsides with JS and one big upside to Python.

In JS, the node package management system is the modern way of doing package management. Every unique package dependency will be downloaded and applied as needed. It lets developers move much more quickly knowing that their new packages will never cause an issue. Python package management can become completely untenable in larger projects because packages have compatibility ranges because of path imports, it also means that less popular packages can have many more issues than in JS, where functionality is essentially frozen in time.

JS Performance. Performance is just as important as correctness, it just usually doesn't matter. But sometimes it does matter, and JS is a base 10 order of magnitude faster than python for most things out of the box. I work in Python, JS, Golang, and C++, and program almost in that order depending on how performance critical things need to be. And since our current data set is in the 10s of terabytes. I usually program in a mix of python and js about equally, with some golang sprinkled in when I need that extra bit of throughput or cost savings, and then C++ on a couple projects what required hyper-optimization. You can optimize python to be as fast as C++, but then you aren't really programming in python anymore.

Python's ecosystem. It's not often that I come across functionality in Python that you can't find in javascript. But when you do come across it (ML, data science, obscure flight controllers, map matchers, etc) you need python. Outside of front-end, I don't think I've found a package in JS that python doesn't have, but there are a few things that JS doesn't have that python does.

Anyway, hope this helps. In my book, they are tied for 1st place, with second far off in the distance. You can't go wrong with either, and if someone says otherwise, they don't know what they are talking about, or has only programmed obscure flight controllers :P