From: budden
Subject: (a-of (b-of c)) is good
Date: 
Message-ID: <ab66a237-af71-4895-a86e-12bf8d4c463b@d36g2000prf.googlegroups.com>
This is a reply to
http://groups.google.com/group/comp.lang.lisp/msg/38106dde37c4801c

Lars Rune Nøstdal  wrote:
> I use (c-of (b-of a)), but it's more common to use or say (c (b a)).

You're doing right. I was looking for something like that and your
solution is ok.
If we always wrote simply
(defclass a () ((b :accessor b)))
at one point we would have a conflict.
Consider
cl-user> (defclass a () ((list :accessor list)))
Error: LIST is defined as an ordinary function #<function LIST
20BDCBB2>

We might admit a more libral policy:
(defclass lisp () ((b :accessor b) (list :accessor list-of)))

In this way we could not tell accessor name from slot name. And even
would not say by symbol name, is it an accessor or not. Using a-of
creates a namespace for all accessors.

There is a second advantage: accessor might be a wrapper, which
would do some more actions other than simple transforming a place.
In this case, we would be interested to find where
(slot-value a 'b) is used for direct access to a slot value.
So we'll be looking for just b.
If we had an accessor named b, grep would return us all the references
to accessor.
This is OOP...  Looks like private slots with public accessors.
Privacy is not supported by a language, but if its violation can be
found easily, this is not a big broblem.

So I don't criticize you for that (a-of). Quite the reverse, it is
fine in a context of a lisp, and I'll accept this for my further
practice.

From: budden
Subject: Re: (a-of (b-of c)) is good
Date: 
Message-ID: <36e70c9c-de49-44ba-8dc3-3945b4660bc0@d10g2000pra.googlegroups.com>
But (a. (b. c) might be more fair
From: Kaz Kylheku
Subject: Re: (a-of (b-of c)) is good
Date: 
Message-ID: <20081107113522.731@gmail.com>
On 2008-11-06, budden <········@mtu-net.ru> wrote:
> But (a. (b. c) might be more fair

Except that it's easily confused for dot notation:

 (a . (b . c))
From: budden
Subject: Re: (a-of (b-of c)) is good
Date: 
Message-ID: <8b892920-b4f0-47d2-aaab-d5c3167ca920@b31g2000prb.googlegroups.com>
>  (a . (b . c))
Maybe, though i don't find it too confusing. There is a notable visual
difference.
Also, in most cases of such a miscpint, compiler would warn. For those
who do find this
confusing, pascalish (a^ (b^ c)) would may be acceptable then.