This is the mail archive of the
guile@sourceware.cygnus.com
mailing list for the Guile project.
Re: Names in libguile
- To: dirk at ida dot ing dot tu-bs dot de
- Subject: Re: Names in libguile
- From: Mikael Djurfeldt <mdj at mdj dot nada dot kth dot se>
- Date: 16 Mar 2000 18:58:55 +0100
- Cc: guile at sourceware dot cygnus dot com
- Cc: djurfeldt at nada dot kth dot se
- References: <E12VeE6-0004Sb-00@mdj.nada.kth.se>
A few more items:
Names, in general, have an internal left-to-right order of increasing
specificity: scm_ is least specific. It is often followed by some
type, like `stack', and, finally, the operation. Example:
scm_stack_length.
There are exceptions, though:
* If a name is already established at the Scheme level, this defines
the C name through the translation scheme.
* According to the rule, we should have `SCM_SMOB_DATA_SET', but we
instead have `SCM_SET_SMOB_DATA'. Generally, `set' should be placed
as far left as possible:
`port-filename' scm_port_filename
`set-port-filename!' scm_set_port_filename_x
SCM_SMOB_DATA
SCM_SET_SMOB_DATA
* Guile has a lot of history with lots of different strange names.
Perhaps a major name overhaul can be done at the same time as we go
through Guile's interfaces to checks soundness and theoretical
properties such as type safety. We *should* be a bit careful with
name changes in order not to break existing application code.