This is the mail archive of the guile@sourceware.cygnus.com mailing list for the Guile project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: hook? primitive


Greg Badros <gjb@cs.washington.edu> writes:

> Yes, most definitely.  I need empty-hook? in Scwm for knowing whether I
> should XSelectInput on MotionNotify events or not.  And the arity is
> essential for supporting a UI that permits interactively adding
> apropriate procedures to the various supported hooks (we can filter the
> potential procs based on their arity matching the arity of the hook
> we're manipulating.)

That doesn't sound very appealing to me.  Not all 3-argument functions
are created equal; just knowing the number of arguments is not enough
information to tell whether the function is really suitable for the
hook.  It sounds fairly confusing to filter out some but not all
unsuitable functions simply by checking the arity; it would be better
to put a property on the function that says what its type is, and do a
real filter.

(Of course, maybe the functions and hooks you're dealing with are such
that filtering on arity works well enough.  But it's still a hack,
that won't work as more functions and hooks are added.)

Carl Witty


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]