From: Thomas A. Russ
Subject: Re: Thin syntax, not parenthesis or prefix
Date: 
Message-ID: <ymin2sbg3le.fsf@hobbes.isi.edu>
In article <·············@ix.netcom.com> Luca Pisati <········@ix.netcom.com> writes:
 > 
 > Expecially in CLOS related areas, I cannot see any statements
 > about possible naming conventions for constructors, readers,
 > slots, "finders" and so on.

Well, that is partly because the language is structured so that a lot of
it ends up being obvious from the forms used.

Most CLOS classes don't have constructors, the just use the built-in
MAKE-INSTANCE.   If a special function is used, it is usually called MAKE-<classname>.

Slots can have any name.  Typically the name of the reader is just the
slotname.  Writing is done using SETF on the the slot name, so there
isn't any need for get-... or set-... names.  The set version is simply
indicated by using setf.

If writers are specified, then I would imagine a name beginning with
SET- would be appropriate, but I haven't encountered much code that
explicitly specified writers.

-- 
Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu    
From: Luca Pisati
Subject: Re: Thin syntax, not parenthesis or prefix
Date: 
Message-ID: <AF4B839B-1B4B2@204.30.73.75>
  In article <·············@ix.netcom.com> Luca Pisati
<········@ix.netcom.com> writes:
   > 
   > Expecially in CLOS related areas, I cannot see any statements
   > about possible naming conventions for constructors, readers,
   > slots, "finders" and so on.
  
  Well, that is partly because the language is structured so that a lot of
  it ends up being obvious from the forms used.

Let's say that CLOS does not suggest any convention. Of course it
is more fair for the language not to suggest or enforce any style,
but, once an application grows so much to contain hundreds of
classes and methods, some convention issues start to arise.

  Most CLOS classes don't have constructors, the just use the built-in
  MAKE-INSTANCE.   If a special function is used, it is usually called
MAKE-<classname>.
  
  Slots can have any name.  Typically the name of the reader is just the
  slotname.  Writing is done using SETF on the the slot name, so there
  isn't any need for get-... or set-... names.  The set version is simply
  indicated by using setf.
  
This is not the problem. What I'm referring about is the possible
relationship between names across superclasses. When a name starts
to be too generic, and when they are too specific.  The topic is related
also to possible naming conventions on how to "hide" slots (as % tries
to do for functions.

  If writers are specified, then I would imagine a name beginning with
  SET- would be appropriate, but I haven't encountered much code that
  explicitly specified writers.
  
  -- 
  Thomas A. Russ,  USC/Information Sciences Institute          ···@isi.edu