This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Unwanted hook names (was Re: interface reductions)
- To: "Greg J. Badros" <gjb at cs dot washington dot edu>
- Subject: Re: Unwanted hook names (was Re: interface reductions)
- From: Dirk Herrmann <dirk at ida dot ing dot tu-bs dot de>
- Date: Fri, 26 May 2000 12:33:13 +0200 (MEST)
- cc: Michael Livshin <mlivshin at bigfoot dot com>, Miroslav Silovic <silovic at zesoi dot fer dot hr>, Guile Mailing List <guile at sourceware dot cygnus dot com>, djurfeldt at nada dot kth dot se
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