This is cute, but it's not really obvious if we're appending to an array or a list or what is going on behind the scenes. From the user's POV, there's some questions:
Can we unregister a handler?
If yes, how? By providing the address of the delegate? Or just by having a unregisterHandler / clear function?
Can you append multiple event handlers?
If you can have multiple event handlers, can you delete each one?
Should each event handler have a label ID? It might be more useful than using pointers (especially since we cannot serialize this form)
Some other issues:
What about event handler persistence? There's event handlers defined in user-code, but what if we want to add new event handlers at runtime through user interaction? Maybe we should be able to persist them (make them serializable).
Currently we use operator overloads via:
This is cute, but it's not really obvious if we're appending to an array or a list or what is going on behind the scenes. From the user's POV, there's some questions:
unregisterHandler
/clear
function?Some other issues: