Difference between event handlers and callbacks

Aaron S picture Aaron S · Jan 15, 2010 · Viewed 38.8k times · Source

What is the difference between an event handler and a callback function?

Answer

Carlos Gutiérrez picture Carlos Gutiérrez · Jan 15, 2010

A callback is procedure you pass as an argument to another procedure. The procedure receiving the parameter can call it, or share it so some other procedures in the system can call it.

An event handler is a procedure called when an event happens. It can be a callback.