Subject: Re: naming conventions for slot accessors
From: rpw3@rpw3.org (Rob Warnock)
Date: Tue, 28 Oct 2008 05:11:55 -0500
Newsgroups: comp.lang.lisp
Message-ID: <fr6dnVbZ7fT2eJvUnZ2dnUVZ_vninZ2d@speakeasy.net>
Kaz Kylheku  <kkylheku@gmail.com> wrote:
+---------------
| Rememeber, an accessor is a generic function, and generic functions
| stand apart from classes!
| 
| The ``of'' is kind of superfluous.
| 
| Consider that some people pronounce f(x) as  ``f of x''. You can
| do the same: write (grade student) but read it ``grade of student''.
+---------------

One situation where "-of" (and similar suffixes) might be useful
is where the accessor name you'd naturally want to used is already
defined as a function inherited from the CL package [which generally
can't have methods added to them], and you'd rather not SHADOW it, e.g.: 

   (phase-of signal)

Such names can of course be used as accessors for unrelated classes, e.g.:'

   (phase-of moon)


-Rob

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607