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]

Names in libguile


Regarding names in libguile, I think we should use these principles:

The C names for Scheme primitives *always* obey a fixed name
translation scheme:

scm_XXX where XXX is translated from the Scheme name, except that

 - becomes _
 ! becomes _x
 ? becomes _p
 % becomes sys_

If there's a C variant of something provided at the Scheme level (like
the current scm_internal_dynamic_wind), it has the prefix scm_c_
instead of scm_.

If there's a C function with global scope which is only intended to be
used internally in libguile, it has the prefix scm_i_.

String literals with global scope has the prefix scm_s_.  (Greg
introduced the prefix s_scm_ but this has to change to scm_s_ since
s_scm_ trespasses the user's namespace.)

Keywords with global scope has the prefix scm_k_.

Symbols with global scope has the prefix scm_sym_.

Variable bindings with global scope has the prefix scm_var_.

(What have I forgotten?)

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