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)


Marius Vollmer <mvo@zagadka.ping.de> writes:

> "Greg J. Badros" <gjb@cs.washington.edu> writes:
> 
> > But the point is to be able to leverage structure in the names to avoid
> > having to do that, and to enable arbitrary such sets to be decided.
> > Having a guaranteed canonical name for a system-special object seems
> > like a good thing to me.
> 
> You should use the module system for that, and not kludge a name onto
> every value.

It's not every value, just the values of things exposed to the C layer
because they are "magic" values.

> If you really want to, you can implement a special purpose name-space
> for hooks, by putting them into a hash-table or something.  How are

That seems roughly equivalent to using the property 'name on each hook,
and that seems fine.

> you going to make use of hook names anyway?  I guess you have a list
> of hooks, and then you run down the list and retrieve the name of a
> hook.  How is that different from having a list of name/hook mappings
> and you run down the this list instead, retrieving the name from the
> mapping and maybe the hook object if you are interested in it.

None, and that seems fine.

> With such an arrangement, you can also have more than one name for a
> single hook, for example.

Yes; I like having one true name for documentation purposes, though.

Greg

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