- is the act of sending something somewhere. In computer science, this term is used to indicate the same concept in different contexts
- like to dispatch a call to a function, dispatch an event to a listener, dispatch an interrupt to a handler or dispatch a process to the CPU
Link to original
- static dispatch - is the process of selecting which implementation of a polymorphic operation (method or function) to call during COMPILE TIME
- dynamic dispatch - is the process of selecting which implementation of a polymorphic operation (method or function) to call at RUNTIME
Advantages of dynamic dispatching
- Develop plug-ins for existing products. No need to recompile the portion of code that relies on the dynamically bonded code
- Create loosely coupled components that are easily unit tested
- Present the same interface by using different implementations (polymorphism)