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: Scheme hooks <-> C hooks


Keisuke Nishida <kxn30@po.cwru.edu> writes:

> I thought an application programmer doesn't need to define C hooks, so
> Guile doesn't need to provide them.

Guile needs them internally.  Guile also needs to provide them in the
API because we want to be able to write external modules providing new
types of objects with special GC behaviour (similar to guardians and
weak vectors).

I'm basically only saying that they should have the generic name they
deserve.  I don't see any advantage with having "gc" in their names.

I think the real "crime" is providing them at all, but, again, they
allowed us to get a more modular design etc.  Once the crime is
committed, I think it's better to express them generically.

Right now they are needed only in the GC.  It could very well be that
they can be used in other parts of Guile, like in the unmemoization
protocol for environments.

I guess I fail to see what worries you...  :(

> But I'm not sure whether it is true...  Is there any case for an
> application author to use C hooks?

Glib provides C hooks, so I guess there are numerous examples.

(Note that the current C hooks have nothing to do with the Scheme
 level.  They could just as well be used in a part of an application
 not related to Guile.)

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