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 25 May 2000, Greg J. Badros wrote:

> This sounds fine to me, and then the scm_create_hook will still take a
> name and just set the property if the name argument is non-null.

Hmm...  Actually I thought that everything related to 'names' of hooks
should, in the long run, be removed from the hooks interface.  I. e. the
following functions should be deprecated:

  #define SCM_HOOK_NAME(hook) SCM_CADR (hook)
  extern SCM scm_make_hook_with_name (SCM name, SCM n_args);
  extern SCM scm_create_hook (const char* name, int n_args);

Since the implementation of scm_create_hook is easy with object
properties, I think it can be accepted that an application which likes
this for convenience reasons can provide such a thing for itself.  There's
no need to put this in libguile.

Thus, as an intermediate solution I suggest to do the following:
  #define SCM_HOOK_NAME(h) scm_object_property (h, scm_makfrom0str ("name"))
and let scm_make_hook_with_name and scm_create_hook set the corresponding
property, but also deprecate these functions.  Thus, there is a chance to
update old code while we can already change the internal representation.

Shall I go ahead and do it that way?

Best regards
Dirk


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