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]

Guile naming conventions



Short description of the problem:  Your environment proposal uses
naming conventions which I think are consistent with R5RS.  However the 
conventions used in your proposal differ from the naming conventions
that guile currently uses.

The rules are either:

--------------------
   > My reading of R5RS is that they use the following convention:
   > Mutators: <collection type>-<operation>-<element type>!
   > Informators: <collection type>-ref-<element type>

   > collection type     operation   element type   
   > vector           -  set                       ! 
   > vector           -  ref             
   >                     set       - car           !
   >                     set       - cdr           !
-------------------- 


or

--------------------
   > [..] the convention we follow currently is:
   > 
   > * as a general rule, name parts should be placed in order of
   >   increasing significance
   > 
   > * selectors typically have the form <prefix><type><component>
   > 
   > * `set' is placed as far left as possible
   > 
   > Example:
   > 
   > port-filename
   > set-port-filename!
--------------------


Consequence:

We must either change the environment proposal to meet the convention
that guile currently uses 

   > Acoording to the convention these should have names
   > 
   > eval-environment-imported
   > set-eval-environment-imported!

   From Jim's environment proposal:

   @deffn Primitive import-environment-set-imports! env imports
   Change @var{env}'s list of imported environments to @var{imports}, and
   check for conflicts.
   @end deffn
   [...]
   @deffn Primitive export-environment-private env
   @deffnx Primitive export-environment-set-private! env 
   @deffnx Primitive export-environment-signature env
   @deffnx Primitive export-environment-set-signature! env
   @deffnx Primitive export-environment-set-private! env 


or we should change guile's naming conventions. 


   > I think the naming convention you describe is reasonable, but it is
   > not the one which Guile developers currently should follow.  This is
   > nothing we should change on a per-name basis.

   > However, we can discuss changing the "official" naming convention.  On
   > the C level, this is a big change, since the convention I describe
   > above has been used extensively.  But on the Scheme level it has not
   > been followed as extensively.

   > We can also have different naming conventions on the different levels.



Jost

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