Hacker News new | ask | show | jobs
by PEJOE 1754 days ago
I agree, but to fair to the author I do not think the vast majority of people are implementing thread pools in python.

I also think there were good reasons the author's linters were left as optional, and its probably not because everyone thought they were great ideas.

1 comments

> I agree, but to fair to the author I do not think the vast majority of people are implementing thread pools in python.

This trope needs to die. While loops are a basic language feature. A thread pool is one very specific example of where that language feature is necessary. Every very specific example is trivially dismissed with "the vast majority of of people aren't doing that very specific thing." It's the laziest rebuttal, and not even wrong.

Cool things I've seen written in python that need while loops: http servers, games, more generally anything that listens on a port or depends on user input, mathematical code that depends on computing a base-k representation, stack-based algorithms...

Hold on, let's stop there. Python sucks at recursion. So bad it's capped at a very small depth. The only reasonable workaround is to avoid the call stack and roll your own, which involves... you guessed it, a while loop. So, this linter prefers buggy stack-smashy code. That's nice. Adults can use another linter.

Did you read the second half of my post? Did you read the authors post at all?