2 ms·
Indeed. The first version is actually more explicit in the sense that you know that only the `item` parameter is being passed to the function. The extra verbosi
by serve_yay 12y ago
Indeed. The first version is actually more explicit in the sense that you know that only the `item` parameter is being passed to the function. The extra verbosity is worth it in my opinion.
It's true that in many cases the shorter version would not be harmful, but I have been bitten by a somewhat similar case where I meant for for the callback to be called with no arguments. Since the callback was passed in the latter style, it was called with arguments and the undesired behavior was difficult to debug. Or rather, it would have been, except that I work with incredibly smart people who saw the problem almost instantly.