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)


On 24 May 2000, Greg J. Badros wrote:

> I'm having trouble dealing with this because I recognize the cleanliness 
> of keeping the bindings separate from the objects, but I still know that 
> from a practical perspective I really want those names around.

So what about the following suggestion:  We provide a function
  scm_name_object (SCM obj, SCM name);
  scm_c_name_object (SCM obj, const char* name);
that enters the object with its name into a weak hash table.  With
  scm_get_object_name (SCM obj);
you can access the name as long as the object lives.  If people think that
it might be usefull, we could also have
  scm_get_object_by_name (SCM name);
  scm_c_get_object_by_name (const char* name);

Probably the functions names are not optimal, maybe the fact that it's a
debugging facility could be made more obvious, but you get the idea.  This
way, _any_ object can be given a name, independent of its context.  And,
no need to provide names to anything any more.

Just a side note:  arbiters also have names.  Maybe there are other types
as well.

Best regards
Dirk


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