Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That's not a fair comparison. You don't have to wrap every use of your method in a closure any more than you have to call the constructor of your callable class on every use.

You have to bind your state to a function exactly once in both cases.

Your example just happens to omit the constructor call required to create the callable object while you are showing the code to create the closure.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: