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: Names in libguile


On Thu, 16 Mar 2000, Mikael Djurfeldt wrote:

> Regarding names in libguile, I think we should use these principles:
[...]
> (What have I forgotten?)

Macros.

There are a lot of macros for predicates, which are either named SCM_XXXP
or SCM_XXX_P.  Unfortunately (IMO) lots of the more frequently used macros
are named SCM_XXXP, while I think the SCM_XXX_P variant is better:  For me
it is better readable, it matches the scm_xxx_p naming scheme, and doesn't
make constructs like SCM_GRPP (I made this up, just to show the idea) or
other strange things necessary if there is some XXX which already ends
with P.

Further, I'd love it if macros to create scheme values from C values would
be named SCM_MAKE_... more consitently.  Currently, we have SCM_MAKICHAR
(OK, this one's been made deprecated), SCM_MAKINUM and others.

Also, some macros are used for symbols or keywords.  The best solution
would be to use a similar naming scheme for these also.

It's good to talk about improving guile's API.  A clean, consistent and
beautiful api is, in my belief, important for guile's attractivity, and
makes learning it easier.  

Best regards
Dirk Herrmann


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