Hacker News new | ask | show | jobs
by chubot 5152 days ago
I wrote a nonblocking library (for pipes/processes/signals) in Python like node.js. So many of the callbacks end up being inner functions (they don't when you decide you can make all the necessary state object-level, and thus make the callback a method).

The anonymous syntax actually reads better than defining an inner function and then calling it.

I think the real reason why they were never added is syntax, and honestly I can't think of a good syntax myself.

1 comments

That makes sense. Callback methods. Thanks.