This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: docstrings in Guile!
> SCM_NIMP(x) && SCM_FOOP(x)
>
> I don't think that there is that big of a performance win by not having
> the SCM_FOOP's check SCM_NIMP (there are some places where the SCM_NIMP
> is factored out into an earlier test that affects several branches).
>
> I think we should fold the SCM_NIMP macro test into SCM_FOOP macro
> definitions, and add a new SCM_F_FOOP (for *F*ast foop) or
> SCM_SLOPPY_FOOP for the cases where we really want that test omitted.
> Then things work right away (perhaps with a non-noticeable performance
> degradation), and where performance *really* counts (based on profiling)
> we can switch to SCM_SLOPPY_FOOP. Elsewhere we just eliminate the
> SCM_NIMP eyesore.
>
> Comments (before I just go run with this idea!)?
I would like to propose to keep SCM_FOOP as it is and add new macros
#define GH_FOOP(X) (SCM_NIMP (X) && SCM_FOOP (X))
which is more like gh_ interface -
There is a lot of code in which authors already checked X for NIMP so IMHO its
easier to get used to GH_ macros rather than rewrite all code already written
for Guile...
Dan Skarda