Closed Implausiblyfun closed 2 years ago
If we rename CallerMap.Reset
to Clear
, then a Context
satisfies the property of having no ambiguous method names in its embedded types, so you can then do event.Bind(ctx, ...
Ah nice I guess I didnt dig deep enough on it. This now definitely feels worth it. Shall we merge this into the events branch?
Not sold on this but its the only shortening of methods that seems even slightly reasonable. Unfortunately creating helper functions around the context with it still working on the generic functions doesnt work and the embedded interface doesnt allow for this to be passwed as an eventhandler to binds. So definitely not ideal and we refer to it as ctx.Handler rather than ctx.EventHandler which while shorter seems less descriptive.
The bonus of course is signature for callermap interactions so one can call things like ctx.Register(entity)
Thoughts?