This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: hook? primitive
Keith Wright <kwright@tiac.net> writes:
> > From: Mikael Djurfeldt <mdj@mdj-pc.nada.kth.se>
> >
> > But are all of these really necessary? I think we should be a bit
> > careful with adding new primitives.
> >
> > (I added first class hook because I wanted it to be easier to manage
> > hooks (putting them in data structures, like a fluid etc) but now I
> > almost regret it. They seem to require an unreasonable amount of
> > support in the implementation.)
>
> I didn't understand the need for anything at all. Why not just a
> list of procedures? Use CONS to add one. OK, it may be a bit
> more complicated than that due to the need to update the head
> of the list, but still a new primitive data type seems excessive.
> Couldn't the whole thing be written in Scheme instead of C?
It's much nicer to have it in C if you want C procedures to be using the
hooks (e.g., running hooks on a window mapping event).
Greg