Search code examples
eventsfunctionprogramming-languages

Event handler and functions are the same thing?


As per my understanding, unlike functions, event handler receives the event object as parameter.

Is there any other difference between those two words or both are similar?

Can anyone elaborate both the terms?


Solution

  • It really depends on the specific language and API you are using. In C for instance, event-handlers are usually implemented as functions. in C++ they can also be callable objects. Other languages may offer different options.