Closed Ambrevar closed 2 years ago
In my opinion, it largely supersedes serapeum/contrib/hooks but it's not backward compatible.
The only drawback that I see currently is that CCL type checking is completely gone. Any idea how to implement it? See https://github.com/atlas-engineer/nhooks/issues/6.
To be clear, are you saying that I should remove/deprecate serapeum/contrib/hooks in favor of nhooks, or that nhooks should replace serapeum/contrib/hooks?
I don't know, actually.
Removing contrib/hooks means losing backward compatibility, which is rather a big move for a library like Serapeum.
Better options include recommending nhooks in Serapeum's readme, and (optionally) including nhooks in the contrib/.
I don't know if there is any advantage in including nhooks into serapeum vs. maintaining it separately.
I've just added a deprecation notice and a link to the new project for the moment.
Thanks!
@BlueFlo0d did some amazing work in https://github.com/atlas-engineer/nhooks and revamped the serapeum/contrib/hooks with the following highlights:
handler
s are now optional and regular functions can be directly added to hooks.T
for enabled handlers andNIL
for disabled ones.