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: scm_map and rest arguments


Jost Boekemeier <jostobfe@calvados.zrz.tu-berlin.de> writes:

> I guess you don't want the comment from me, but anyway. :)

why? ;)

> [ ... ]

well -- actually, I find the idea of splitting all externally callable
functions into two (one that checks arguments and the other other, the
other does the work and does no checking) a good one.

except that for some functions it would "leak computation", because
the checking in them is nicely intermingled with processing -- but
that preserves the performance in the time complexity sense, and so is 
OK ;).

so maybe it should look like this:

(assume this is eval.h)

SCM scm_map_sloppy (SCM proc, SCM arg1, SCM args);

#if (SCM_DEBUG_REST_ARGUMENTS == 0)
#define scm_map scm_map_sloppy
#else
SCM scm_map (SCM proc, SCM arg1, SCM args); /* scm_map is assumed to
                                               check its args and call
                                               scm_map_sloppy */
#endif

-- 
A CONS is an object which cares.
                -- Bernie Greenberg.

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