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: thanks


Greg Harvey <Greg.Harvey@thezone.net> writes:

> scm_protect...: this is really specific to guile.

Actually GC protection is rather generic concept, and pretty
common. Also, it is implementation independant if you provide gh_cons
- then gc_protect is just

global_protect_list = gh_cons (object, gh_protect_list);

(while this would be rather inefficient for unprotects - you might
want to provide gh interface for hash tables and use them instead).

> gh (excellent initials, those ;) should

Funny. :)

> be a collection of useful abstractions that allow you to do what you
> want, without exposing you to exactly how it's done inside guile.

I think this is an issue to discuss.

Many parts of scm_ interface are just straigtforward C bindings of
RnRS. For example, scm_cons, scm_assq_* etc is just Scheme directly
translated into C. This seems like a reasonably
implementation-independant part of the interface. So... Is there a
point in writing gh wrappers around these? Would it do to just use
#define to alias scm_cons to gh_cons instead? Or to split scm_
interface into guile specific (e.g. smob functions) and general
(RnRS library functions) and document it as such?


-- 
How to eff the ineffable?

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