Relative Content

Tag Archive for callbacks

Is a callback function with `this` as an argument a bad practice?

I have a class that has a callback function that gets triggered on some event. The user of the class instance is expected to do stuff on the instance itself, inside this callback function. So I am wondering if I should add the instance itself as an argument to the callback.