atlas-engineer / nhooks

MIT License
18 stars 5 forks source link

List all hooks #14

Open Ambrevar opened 2 years ago

Ambrevar commented 2 years ago

To implement hook listing as a command/function, one'd need to go through all the slots and variables and find those that are nhooks:hook-typed, which not all of the hooks are (let alone the strictness of typing on different implementations). Listing instances of nhooks:hook and subclasses may be better, but the best approach to it would be non-portable at best.

There is another way: in the nhooks library we can tweak the initializer to references all the hooks, which would then be reported by a nhooks:all-hooks functions or the like.

But this does not report the bound symbols, if any.
The first approach does it however.

Do we want both approaches?

This is a fairly general problem in CL, others must have dealt with it before, nah?