[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Opaque objects and Emacs documentation
From: |
Dmitry Gutov |
Subject: |
Re: Opaque objects and Emacs documentation |
Date: |
Tue, 21 Jul 2020 23:56:41 +0300 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.10.0 |
On 21.07.2020 22:36, Eli Zaretskii wrote:
A predicate would look like:
(defun project-instance-p (pr)
(condition-case nil
(progn
(project-roots pr)
t)
(error
nil)))
I actually thought about cl-defgeneric etc., since obviously each type
of project should have its own implementation.
There's no point. If it implements project-root, it's a project.
But I don't see how it's going to help you write documentation.
It makes the object system more complete. Suppose some application
would like to check it gets a valid object, before dispatching?
I can imagine some marginal utility in that, but not enough to mandate
every backend to implement a project-instance-p method which simply
returns t.
. a function to compare two objects of this type
As discussed, it's a little function called 'equal'.
Again, I envisioned a cl-defgeneric here. Using 'equal' only works
for simple forms,
Lists, cl-structs, eieio classes, etc, can also be equal.
- Re: Opaque objects and Emacs documentation, (continued)
- Re: Opaque objects and Emacs documentation, Richard Stallman, 2020/07/17
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/18
- Re: Opaque objects and Emacs documentation, Richard Stallman, 2020/07/18
- Re: Opaque objects and Emacs documentation, Eli Zaretskii, 2020/07/19
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21
- Re: Opaque objects and Emacs documentation, Eli Zaretskii, 2020/07/21
- Re: Opaque objects and Emacs documentation,
Dmitry Gutov <=
- Re: Opaque objects and Emacs documentation, Tomas Hlavaty, 2020/07/21
- Re: Opaque objects and Emacs documentation, Tomas Hlavaty, 2020/07/21
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21
- Re: Opaque objects and Emacs documentation, Tomas Hlavaty, 2020/07/21
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21
- Re: Opaque objects and Emacs documentation, Eli Zaretskii, 2020/07/21
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21
- Re: Opaque objects and Emacs documentation, John Yates, 2020/07/21
- Re: Opaque objects and Emacs documentation, Dmitry Gutov, 2020/07/21