Email list hosting service & mailing list manager

Re: Couple things... tb@xxxxxx 27 Dec 2003 19:34 UTC

Michael Sperber <> writes:

> A strong reason to prefer C macros over functions in this kind of
> settings is that functions live in a global namespace, while the
> macros (can) live in a local one.  In principle, macros allows, say,
> hooking up two Scheme systems, while functions wouldn't.

If this is your best reason, it's very weak.  Using macros only makes
it possible if the two Schemes agree about what global names to
avoid.  If they agree to cooperate, then a shared global name function
can still be used.  At best, macros make it *simpler* to agree, but
hardly guarantee it.  Moreover, if you need to rename functions in one
scheme or the other, to avoid a collision, where the FFI uses only
macros, you still might have a disaster.  Renaming functions is
generally not a simple matter.

Moreover, your advantage is only realized if the schemes are
*required* to use macros, instead of merely permitted, and even then,
many will choose to implement lots of things by straightforward

And finally, there are C systems which enable such functions to be in
a local namespace.