factor icon indicating copy to clipboard operation
factor copied to clipboard

Add HOOK-CONSULT: to delegate

Open twopir opened this issue 3 years ago • 3 comments

This allows for delegation of hooks and their associated singletons, working around their inability to be subclassed.

twopir avatar Aug 12 '22 23:08 twopir

Looks pretty good!

I was hoping somehow it could auto-detect GENERIC: vs HOOK: and handle it transparently so you don't have to specify the hook-var in the HOOK-CONSULT: usage, but I haven't looked to see if it's reasonably doable.

mrjbq7 avatar Aug 13 '22 00:08 mrjbq7

we couldn't see a reasonable way to go from "a singleton that's in a hook" back to the hook-var itself, at least by introspecting on the word-props.

twopir avatar Aug 13 '22 00:08 twopir

per Discord,

the property is already there, it's the combination word property on a generic, it's a hook-combination if it's a hook and it contains the var being dispatched on

so with that, we ought to be able to eliminate the need to specify the variable as well. Shall hack on this today.

twopir avatar Sep 13 '22 14:09 twopir

"today" being many months later, i guess...

theAlexes avatar Mar 15 '23 04:03 theAlexes

Merged, thanks!!

mrjbq7 avatar Aug 21 '23 21:08 mrjbq7