Rocksolid Light

Welcome to RetroBBS

mail  files  register  newsreader  groups  login

Message-ID:  

Klein bottle for rent -- inquire within.


devel / comp.lang.lisp / Questions about SLOT-VALUE

SubjectAuthor
* Questions about SLOT-VALUESpiros Bousbouras
`* Re: Questions about SLOT-VALUEZyni Moë
 `- Re: Questions about SLOT-VALUESpiros Bousbouras

1
Questions about SLOT-VALUE

<e3b0G7FeAEC37p8f8@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16959&group=comp.lang.lisp#16959

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!aioe.org!wMjcvFyyQbKkD1DyxkS8fQ.user.46.165.242.91.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Questions about SLOT-VALUE
Date: Mon, 14 Mar 2022 18:05:20 -0000 (UTC)
Organization: Aioe.org NNTP Server
Message-ID: <e3b0G7FeAEC37p8f8@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
Injection-Info: gioia.aioe.org; logging-data="49242"; posting-host="wMjcvFyyQbKkD1DyxkS8fQ.user.gioia.aioe.org"; mail-complaints-to="abuse@aioe.org";
X-Organisation: Weyland-Yutani
X-Notice: Filtered by postfilter v. 0.9.2
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Mon, 14 Mar 2022 18:05 UTC

1. The CLHS page for SLOT-VALUE calls it a "function" as opposed to an
"accessor" although you can do (setf (slot-value ... )) .Is this an
oversight ? Because with every other function I can think of which can
be used with SETF , the corresponding CLHS page calls it an "accessor".

2. The same page says

If an attempt is made to read a slot and no slot of the name slot-name
exists in the object, slot-missing is called as follows:
[...]

If an attempt is made to write a slot and no slot of the name slot-name
exists in the object, slot-missing is called as follows:
[...]

The specific behavior depends on object's metaclass. An error is never
signaled if object has metaclass standard-class. An error is always
signaled if object has metaclass built-in-class.

What specific behaviour depends ? Is it what will happen if SLOT-MISSING gets
called ? The page for SLOT-MISSING doesn't say anything about dependency on
an object's metaclass.

--
vlaho.ninja/prog

Re: Questions about SLOT-VALUE

<t0sa4c$tiu$1@dont-email.me>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16961&group=comp.lang.lisp#16961

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: no_email@invalid.invalid (Zyni Moë)
Newsgroups: comp.lang.lisp
Subject: Re: Questions about SLOT-VALUE
Date: Wed, 16 Mar 2022 09:20:12 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 27
Message-ID: <t0sa4c$tiu$1@dont-email.me>
References: <e3b0G7FeAEC37p8f8@bongo-ra.co>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 16 Mar 2022 09:20:12 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="03abc3a2ea4a439fb7efcc480e002ff6";
logging-data="30302"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19De65mFgzK2SvVLT1M2hESwDe11TeDlOs="
User-Agent: NewsTap/5.5 (iPad)
Cancel-Lock: sha1:ecBoEG8hGWiWoXZUQ8l3R7Csj9g=
sha1:fbrjAukZ703ISs1Zfxp7fZ1ZrEs=
 by: Zyni Moë - Wed, 16 Mar 2022 09:20 UTC

Spiros Bousbouras <spibou@gmail.com> wrote:
> 1. The CLHS page for SLOT-VALUE calls it a "function" as opposed to an
> "accessor" although you can do (setf (slot-value ... )) .Is this an
> oversight ? Because with every other function I can think of which can
> be used with SETF , the corresponding CLHS page calls it an "accessor".

Doesn't matter, but perhaps an oversight.

> The specific behavior depends on object's metaclass. An error is never
> signaled if object has metaclass standard-class. An error is always
> signaled if object has metaclass built-in-class.
>
> What specific behaviour depends ? Is it what will happen if SLOT-MISSING gets
> called ? The page for SLOT-MISSING doesn't say anything about dependency on
> an object's metaclass.

Whether SLOT-VALUE signals error or calls SLOT-MISSING or SLOT-UNBOUND in
the appropriate cases: it never signals an error and always calls
SLOT-MISSING or SLOT-UNBOUND for objects whose metaclass is STANDARD-CLASS,
it always signals an error for objects of metaclass BUILT-IN-CLASS, and for
objects of other metaclasses its behaviour is undefined, which allows it to
work, or not work, for structures & conditions (am not sure metaclass of
conditions is specified, structures is).

--
the small snake

Re: Questions about SLOT-VALUE

<pLPnoWANiMAT4jV2k@bongo-ra.co>

  copy mid

https://www.rocksolidbbs.com/devel/article-flat.php?id=16965&group=comp.lang.lisp#16965

  copy link   Newsgroups: comp.lang.lisp
Path: i2pn2.org!i2pn.org!eternal-september.org!reader02.eternal-september.org!.POSTED!not-for-mail
From: spibou@gmail.com (Spiros Bousbouras)
Newsgroups: comp.lang.lisp
Subject: Re: Questions about SLOT-VALUE
Date: Wed, 16 Mar 2022 14:16:51 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 58
Message-ID: <pLPnoWANiMAT4jV2k@bongo-ra.co>
References: <e3b0G7FeAEC37p8f8@bongo-ra.co> <t0sa4c$tiu$1@dont-email.me>
Mime-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 16 Mar 2022 14:16:51 -0000 (UTC)
Injection-Info: reader02.eternal-september.org; posting-host="5cd7d5325c0d11bf11e4d9a0238366b2";
logging-data="14968"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19yn+I9zgCN6JYr+04UpNaU"
Cancel-Lock: sha1:uUyCPijEf8m5ffaF7MeRb9LTSQ0=
In-Reply-To: <t0sa4c$tiu$1@dont-email.me>
X-Organisation: Weyland-Yutani
X-Server-Commands: nowebcancel
 by: Spiros Bousbouras - Wed, 16 Mar 2022 14:16 UTC

On Wed, 16 Mar 2022 09:20:12 -0000 (UTC)
Zyni Moë <no_email@invalid.invalid> wrote:
> Spiros Bousbouras <spibou@gmail.com> wrote:

[...]

> > The specific behavior depends on object's metaclass. An error is never
> > signaled if object has metaclass standard-class. An error is always
> > signaled if object has metaclass built-in-class.
> >
> > What specific behaviour depends ? Is it what will happen if SLOT-MISSING gets
> > called ? The page for SLOT-MISSING doesn't say anything about dependency on
> > an object's metaclass.
>
>
> Whether SLOT-VALUE signals error or calls SLOT-MISSING or SLOT-UNBOUND in
> the appropriate cases: it never signals an error and always calls
> SLOT-MISSING or SLOT-UNBOUND for objects whose metaclass is STANDARD-CLASS,
> it always signals an error for objects of metaclass BUILT-IN-CLASS, and for
> objects of other metaclasses its behaviour is undefined,

Actually unspecified.

> which allows it to
> work, or not work, for structures & conditions (am not sure metaclass of
> conditions is specified, structures is).

Ok , I had a look on the CLHS page for BUILT-IN-CLASS and it's clear now.
Initially I had read the "Whether SLOT-VALUE signals ..." text as referring
to the situation where one attempts to read or write a slot and "no slot of
the name slot-name exists in the object" .But the page for BUILT-IN-CLASS
makes it clear that

Calling slot-value on an instance of a built-in class signals an error of
type error.

I think the text on the SLOT-VALUE page would be clearer as follows :

Calling SLOT-VALUE on an instance of an object whose metaclass is
BUILT-IN-CLASS signals an error of type error.

For objects whose metaclass is STANDARD-CLASS:

If an attempt is made to read a slot and no slot of the name
slot-name exists in the object, slot-missing is called as follows:

[...]

If an attempt is made to write a slot and no slot of the name
slot-name exists in the object, slot-missing is called as follows:

[...]

Calling SLOT-VALUE on an instance of an object whose metaclass is neither
BUILT-IN-CLASS nor STANDARD-CLASS has unspecified consequences.

--
vlaho.ninja/prog


devel / comp.lang.lisp / Questions about SLOT-VALUE

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor