News for hackers. Stuff that matters.
Re:How the CPython compiler works by kstrauser on Thursday September 24, 2020 @02:36PM (#24581930)
Sure, and we agree: you wouldn’t use pure Python for something where every scrap of performance matters. I’m just saying, I’ve used Python extensively for a couple of decades now, from web services, to orchestrating devops tooling, to being the management interface that controlled a high-speed/low-latency service, to driving pipelines that moved around terabytes of data, doing number crushing with Numpy. In all of those cases, Python was a delight and was not the bottleneck. So while I don’t really disagree with you, I think you’re giving it the short shrift to say it’s fine for just “a little glue code”. It’s amazing how many practical problems in software engineer come down to gluing systems together in new and cool ways.
Re:How the CPython compiler works by throwaway894345 on Thursday September 24, 2020 @03:10PM (#24582364)
> It’s amazing how many practical problems in software engineer come down to gluing systems together in new and cool ways.

Right, but the difference is whether you will ever have to do more than "just a little glue" and making sure you can easily delegate to a different tool to handle those cases. In my experience, there are precious few cases where you never have to do more than just a little glue. Basically any application in which Python owns the data model (e.g., the data model is a non-trivial tree of Python class objects), this is incompatible.

> Sure, and we agree: you wouldn’t use pure Python for something where every scrap of performance matters.

I don't want to be disagreeable, but this is the sort of thing I would say about Go or Java--you shouldn't use it for cases where every scrap of performance matters. But there's an enormous gap between the things Python can do and the things that Go and Java can do. Moreover, if you do run into problems with Go or Java, there's a lot of optimization available to you (at least not in the general case, although there are niches where you can gain a lot of performance with pandas or similar).

Moreover, there's just not a good reason to choose it these days. There are better options without the traps.