From: Dmitry Gutov <dgutov@yandex.ru>
To: Eli Zaretskii <eliz@gnu.org>
Cc: 22336@debbugs.gnu.org, monnier@IRO.UMontreal.CA
Subject: bug#22336: 25.0.50; cl-generic.el features are not documented in ELisp manual
Date: Sun, 24 Jan 2016 03:45:21 +0300 [thread overview]
Message-ID: <56A41EA1.3010406@yandex.ru> (raw)
In-Reply-To: <83pows43ft.fsf@gnu.org>
On 01/23/2016 08:21 PM, Eli Zaretskii wrote:
> I know. The point is the stuff contradicts itself, and when I was
> reading this, I needed to decide which part to believe and which to
> discard. I think I mostly succeeded, albeit at a significant cost;
> I've mentioned these only because you asked about them.
It doesn't exactly contradict itself, though it almost looks that way.
I've renamed the argument to hopefully make it make more sense.
>>> Anyway, specific methods can evidently be defined by cl-defgeneric as
>>> well, whereas the doc string says they should be defined by
>>> cl-defmethod. The semantics of :method is never described at all (and
>>> I saw no examples of its usage to inspire me, AFAIR).
>>
>> Is the can/should distinction a problem?
>
> Of course it is. "Should" is sometimes a synonym of "must".
Actually, the docstring says "methods are defined", not that they should
be defined. And that's true either way: the :method definitions, and the
default-body, are still passed to cl-defmethod.
I don't how to improve this part, so I didn't touch it.
>> I think the semantics are easy to guess, but I probably glanced at CL's
>> documentation as well at some point:
>
> I did guess, see what I wrote in the manual. But I shouldn't have
> needed to guess, I think.
I didn't touch this one either. The current description in the docstring
might be enough, since I wrong the examples in the previous message just
by looking at the docstring.
>>> "_The_ dispatch argument", in singular means only one such argument is
>>> possible, which is of course false.
>>
>> Indeed. There's a case to be made for discouraging multiple-argument
>> dispatch ("implemented rather naively"), but the docstring should be
>> corrected anyway.
>
> I thought this was one of the strong points of Lisp-style OOP.
Docstring corrected.
>> cl-defmethod docstring should probably enumerate the possible types
>> (aside from the mentioned ones, TYPE can be (head ...) or a name of
>> cl-struct, like the commentary says).
>
> I think so, yes. Also, it should at least hint on the hierarchy of
> types.
Types are now mentioned, as well as the word "hierarchy". I've
referenced a private variable to do that, but I think that's okay in a
docstring (docstrings are allowed to change between releases).
next prev parent reply other threads:[~2016-01-24 0:45 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-09 9:06 bug#22336: 25.0.50; cl-generic.el features are not documented in ELisp manual Eli Zaretskii
2016-01-09 10:07 ` Eli Zaretskii
2016-01-16 8:25 ` Eli Zaretskii
2016-01-22 21:17 ` Eli Zaretskii
2016-01-23 5:29 ` Dmitry Gutov
2016-01-23 6:06 ` Eli Zaretskii
2016-01-23 8:20 ` Dmitry Gutov
2016-01-23 12:51 ` Eli Zaretskii
2016-01-23 17:02 ` Dmitry Gutov
2016-01-23 17:21 ` Eli Zaretskii
2016-01-24 0:45 ` Dmitry Gutov [this message]
2016-01-24 0:48 ` Dmitry Gutov
2016-01-24 5:03 ` Stefan Monnier
2016-01-24 14:34 ` Eli Zaretskii
2016-01-24 23:00 ` Stefan Monnier
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=56A41EA1.3010406@yandex.ru \
--to=dgutov@yandex.ru \
--cc=22336@debbugs.gnu.org \
--cc=eliz@gnu.org \
--cc=monnier@IRO.UMontreal.CA \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.