unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Han-Wen Nienhuys <hanwen@cs.uu.nl>
Cc: guile-devel@gnu.org
Subject: Re: GC rewrite, first version.
Date: Wed, 31 Jul 2002 20:02:46 +0200	[thread overview]
Message-ID: <15688.9798.978583.867042@meddo.cs.uu.nl> (raw)
In-Reply-To: <Pine.GSO.4.05.10207311851550.139-100000@sallust.ida.ing.tu-bs.de>

dirk@sallust.ida.ing.tu-bs.de writes:
> However, when you are going to add your stuff to CVS I think it is
> important that it does not deliberately violate conventions that have been
> agreed upon.  Feel free to start a discussion about improving the
> convention, but until the decision is made to change things the way you
> like it, please follow the current convention when changing code in CVS.

I'm a bit reluctant to start a discussion, because that typically
draws comments from people that don't code, but do think they know
better anyway.

With this warning in advance, comments from people that write actual
Scheme code is welcome.

Personally, I view source code as a form of prose. It should be easily
readable. Hence I prefer variable names that can just be read as an
english expression, with the prefix scm_ for delimiting our namespace,
perhaps with an abbreviation here or there to keep the lines within my
editor window. Typically, the most generic word (always a noun), eg
number, size, string, comes last

i.e.

  scm_heap_segment_table_size
  scm_formals_str(ing)

in stead of 

  scm_n_heap_segs
  scm_s_formals
  
Inside C structs this convention is kept reasonably well, i.e.

  throw_value
  jmpbuf
  backing_store_size
  line_number
  rstate_size

However, all exported symbols that don't have a Scheme-derived name
are named with unpronounceable and unreadable names.

I would prefer the following:

 internal ENTITY_X:   internal_ENTITY_X  (not i_ENTITY_X)
 string FOO: FOO_string (not s_foo)
 BAR-type: Bar_type (not t_BAR)

 (or even: simply BAR. Constructors are named new_BAR, so no clashes
 should arise)

 number of FOOS: FOO_count

Perhaps the other way (generic word first) would also be readable, but
then most of the C code is wrong.

To what extent are these naming standards decided (names.txt is dated
march, and I believe little has been done on the code since)? If it is
we have to wait for two releases (four years) before the old names are
scrapped, then I'm not going to waste energy on it.

And for the rest, I think that GUILE 1.6 should be released.

As an aside, if no-one objects to it, I would like to merge the new GC
code coming weekend.

-- 
Han-Wen Nienhuys   |   hanwen@cs.uu.nl    | http://www.cs.uu.nl/~hanwen/


_______________________________________________
Guile-devel mailing list
Guile-devel@gnu.org
http://mail.gnu.org/mailman/listinfo/guile-devel


  reply	other threads:[~2002-07-31 18:02 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-07-27 22:54 GC rewrite, first version Han-Wen
2002-07-28 16:40 ` Rob Browning
2002-07-29 20:11   ` Dirk Herrmann
2002-07-29 21:04     ` Rob Browning
2002-07-29 22:05       ` Han-Wen
2002-07-31 17:03         ` Dirk Herrmann
2002-07-31 18:02           ` Han-Wen Nienhuys [this message]
2002-07-31 21:15             ` Rob Browning
2002-08-01  9:20               ` Release Guile, now ;-) [was:] " rm
2002-08-01 16:27                 ` Rob Browning
2002-08-01 16:44                   ` rm
2002-08-01 18:37                   ` Sergey Poznyakoff
2002-08-01 22:21                     ` Rob Browning
2002-08-02  6:09                       ` Sergey Poznyakoff
2002-08-02 14:36                         ` Rob Browning
2002-08-02 17:29                           ` Sergey Poznyakoff
2002-08-02 18:10                             ` Bruce Korb
2002-08-02 19:50                               ` Rob Browning
2002-08-03  7:13                               ` Sergey Poznyakoff
2002-08-04 20:43                                 ` Bruce Korb
2002-08-04 20:57                                   ` Sergey Poznyakoff
2002-08-01 22:40                   ` Rob Browning
2002-08-02  9:35                     ` rm
2002-08-02 11:59                       ` rm
2002-08-02 15:00                         ` Rob Browning
2002-08-02 14:50                       ` Rob Browning
2002-08-01  9:59               ` Han-Wen Nienhuys
2002-08-01  8:46             ` Marius Vollmer
2002-07-31 18:46         ` Neil Jerram
2002-08-01  9:58           ` Han-Wen Nienhuys
2002-07-28 16:51 ` Michael Livshin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/guile/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=15688.9798.978583.867042@meddo.cs.uu.nl \
    --to=hanwen@cs.uu.nl \
    --cc=guile-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).