Search code examples
callbackfunction-pointershandle

function handle vs function pointer vs callback function


In order to learn specifics of each of the paradigms of function handle, callback function, and function pointer (e.g. memory taken by them, etc) , one needs to know their differences.

Now the question is what the differences between function handle, callback function, and function pointer are? Are they all the same thing?


Solution

  • function handles and function pointers are the same thing. They hold a reference to a function. A callback function is a fancy name for a function used as a callback. Often a callback function is specified as a handle or pointer to the actual function, depending on language.