Comment

Comment by mumblemumble

A case study from my own personal experience:

We generally do everything in Java. Python is avoided because of all the usual complaints - dynamically typed, not fast enough, GIL, etc.

So, as a PoC, I decided to try rewriting one of our services in Python. And, compared to the Java one, it is:

Cheaper to write and maintain. About 1/10 as many SLOC. About 1/20 as many person-hours.

Has better static type checks. For example, Java's type checker cannot statically verify for null safety. The Python one I chose does do that. Note that, since I did choose to put type hints on everything, the productivity boost in question cannot be attributed to dynamic typing.

(That said, not all 3rd-party libraries have type hints, so, if you want to type check everything, you may have some yak shaving to do.)

Uses less RAM. About 1/2 as much.

Is faster. Admittedly I'm leaning on numpy, Cython, and friends for this. It may well be much slower for projects where that is not possible. But still, I think that the point about premature operation stands in this case.

(Disclaimer: I also have a colleague at $FAMOUS_COMPANY who tells me they are moving off of Python because they found the opposite of the above in many cases. Though I personally suspect that a mitigating factor is that their profit margins and scale are large enough that all the coefficients in their cost/benefit formula are wildly different from the norm.)

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton