Burgestrand/Hallon — Issue #56: Refactor the event system
Author: Burgestrand
Created: 2011-11-24 07:09:37+00:00
State: open

Right now it’s kind of clunky. Events are very raw, and there’s no good way for Hallon to make them prettier on the eyes (say, wrapping the parameters in Hallon objects, or even documenting them well). It’s also a bit over-engineered, in the way that it allows more than one handler for one event; this makes it more complicated, but for todays’ purposes not necessarily better.

- work out a way to test it; this is not too bad, just call them from C
- protect against raised exceptions in the callbacks (I suspect shit breaks if one is raised today)
- make sure they’re documentable and wraps well
- pretty up the event *names*, I think this is important for document and API intuitiveness
- it needs to support Session#process_events_on; do not care how

This hints at some kind of metaprogramming to declare events on certain objects, and would make it easier to prevent against clients listening on events that does not exist (typos).