3 ms·
It's an event system, what you would use function pointers for in C. I think its clearer to be specific and call delegates 'an implementation of the observer de
by roel_v 15y ago
It's an event system, what you would use function pointers for in C. I think its clearer to be specific and call delegates 'an implementation of the observer design pattern', rather than a design pattern in itself. Other implementations include the class GoF way with subclassing, or typesafe callback abstractions like libsigc or boost::signals in C++. In dynamic languages you'd just store an array with strings of function names to call, or object/method name pairs of methods to call.
- cnunciato 15y agoWell said. Observer is how I got my head around it also.