Hook class with toggler and handler types?
What do you think of adding slots to the hook classes:
-
An
enabled?slot, which, when nil, makesrun-hookineffective. It's an easy way for the user to toggle hooks at run-time. -
The type of the
handlersslot. We can indeeddeftypea list of function types to give a (compile-time) type guarantee if the hook contains accepted handlers or not.
Thoughts?
CC @vindarel
As a user, after some testing (in Next), I don't feel the need of an enabled? slot per hook but a global switch that allows to disable/enable all hooks altogether.
Type warnings would be awesome.
Also, I was looking for a list of all the installed hooks, maybe it can be added here.
Since you people seem to have much broader requirements and also seem to be able to put in much more effort than I can (at the moment), let me again suggest that you work in a fork for now instead of letting me hold you back.
Will do! No worries, you are not holding us back, even if you don't have time to put into this it's good to have a public discussion on this and hear your opinion about those suggestions :)
@vindarel: if we are more local, we can always be global, while the reverse is not true. So if we can toggle a specific mode and we can list all modes, then it's trivial to disable all modes.