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: Unwanted hook names (was Re: interface reductions)


Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:

> Mikael Djurfeldt <mdj@mdj.nada.kth.se> writes:
> 
> > > > >   SCM_HOOK_NAME
> > > 
> > > This is not actually related to the question of whether this macro
> > > should be deprecated, but:  Does it make sense to have objects with
> > > names?  If we think of a name being an essential part of a hook, then it
> > > is OK to provide functions for accessing it.  But, I don't think that
> > > hooks should have a name.  Otherwise, you could give names to any kind of
> > > scheme object, like cells with names :-)
> > 
> > Personally, I agree.  I think this was added because the SCWM people
> > claimed that it was good for debugging if hooks have names.
> 
> Oops!  This is not fair.
> 
> I just looked at my personal archive and discovered that it comes from
> me.  I apologize for coming up with such a bad idea.  :(

Well, as a Scwm person (and probably the Scwm person that supported the
idea), I still want hooks to have internal names.  For debugging (i.e.,
for the printable form of the hook object) it's incredibly useful, but
also for reflection -- e.g., code might want to instrument all of the
hooks that have "window" in their name.  Relying on the bindings of an
environment is not right because those are dynamic.  There are static
properties of a hook (e.g., where that hook is invoked) that we need
some way to map back to given just the hook object itself.

> Feel free to deprecate this part of a hook's functionality if you
> want.

I'd prefer that it not get depracated.  As a point of comparison, does
Emacs let hooks have names?

> We still need to easily be able to create a binding for a hook from a
> C application, though.  Currently this is made by `scm_create_hook',
> but that interface needs to be updated when we have merged Jost's
> environments.  (This is actually pending now.)

Yes, pending.... (I now know it won't happen this weekend, but likely
the following weekend).

Thanks,
Greg

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