Hacker News new | ask | show | jobs
by karxxm 1312 days ago
All your advantages of Java also apply to Python. Why would Java be the better choice compared to Python? Or to rephrase this question, why do you think that Python is only good for small teams (with an eye on all these massive billion dollar projects like Instagram which were built in python)?
4 comments

Python is a pretty terrible language for large scale development.

The main reason is that it's effectively impossible to isolate code without physical separation. The upshot is that you end up heavily reliant on testing and byzantine development processes to keep your head above the water.

That's partly the reason why ideas like micro services have caught on. They offer the physical separation and they can have advantages that aren't easy to get elsewhere e.g. redundancy. But they also add a lot of overhead and complexity, which is fine if you're using them for their advantages, less so if you're using them for deficiencies in your language.

So, I too would argue that Java is a better language than Python for large scale system development. I wouldn't necessarily say it's the best, as other languages are often better in specific circumstances, but Python is pretty poor for big software.

Source: a lifetime designing, building and maintaining large and very large systems in Java, Python, C++, C#, Smalltalk, APL, and various niche languages that have disappeared into obscurity.

I love Python and have been using it for 20+ yrs as well. I have seen a lot of pain on older Python projects (pre type hints). I think you need more discipline and tests and docs to keep a large Python project on track. Not saying you can't do it, it just takes more work than with a statically compiled lang. However as I said - type hints have (imho) a huge improvement for large scale Python projects.
as great as hints are they still don’t provide any compile time type checking nor even enforce the types. so they are exactly just hints. a statically typed python might be interesting
that's a good point but you do get warnings about issues (that you can block CI build on) and also much better IDE support
There were many MVPs built on Python that later gained popularity - but many of these (but not all!) have been rewritten in other languages at some point.

If I'd have to chose two reasons to answer your question, I'd pick up lack of static typing and relatively slow performance. Both can be alleviated (by things like MyPy, PyPy etc.) but it's not built in. You can build larger projects in Python, you just need more discipline and be realistic about potential bottlenecks.

can't beat the JVM, python is great for many reasons and situations though