help-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: EIEIO accessing class slots


From: Stefan Monnier
Subject: Re: EIEIO accessing class slots
Date: Fri, 11 Jun 2021 10:23:39 -0400
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.0.50 (gnu/linux)

>>> If you expect it to return the ((moirai-dired-p) ...)
>>> you specified in the `defclass`, then why not do:
>>>     (defvar foo-bar '((moirai-dired-p) ...))
>>> so you can get this value without having to ask the class?
>> Is that terrible to ask to the class ?
> To the extent that it doesn't exist in CLOS, then I think it's better to
> avoid using this functionality ;-)

Another reason is that this is an undocumented behavior: `oref-default`
is defined to return the value of class-allocated slots, not the "default
value" of normal slots.


        Stefan




reply via email to

[Prev in Thread] Current Thread [Next in Thread]