How to write comments to explain the "why" behind the callback function when the function and parameter names are insufficient for that?
- by snowmantw
How should I approach writing comments for callback functions? I want to explain the "why" behind the function when the function and parameter names are insufficient to explain what's going on.
I have always wonder why comments like this can be so ordinary in documents of libraries in dynamic languages:
/**
* cb: callback // where's the…