From: "Mattias Engdegård" <mattias.engdegard@gmail.com>
To: Andrea Corallo <acorallo@gnu.org>
Cc: Andrea Corallo <akrl@sdf.org>, Eli Zaretskii <eliz@gnu.org>,
emacs-devel <emacs-devel@gnu.org>
Subject: Re: Inferred function types in the *Help* buffer
Date: Thu, 1 Jun 2023 15:06:24 +0200 [thread overview]
Message-ID: <B3F717B8-A234-4C6A-BB35-B633CFE3854D@gmail.com> (raw)
In-Reply-To: <yp1v8g7mmfe.fsf@fencepost.gnu.org>
1 juni 2023 kl. 13.50 skrev Andrea Corallo <acorallo@gnu.org>:
> if something will prove not to
> be correct we'll just fix it as we do for everything else.
I think the general idea is fine. What I meant was that some type specifications can be more of a hindrance than help, in the same way that we in some docstrings prefer to override the automatically generated argument signature -- for better precision, or to avoid confusing the user with technicalities or obsolete arguments.
There may also be a problem of inaccuracy, and here is a little anecdote. I needed a table of boolean functions that only return nil or t for the byte-compiler, so I tried to use comp-known-type-specifiers.
Either I misunderstood what a return value of `boolean` means, or that list is riddled with errors. The following functions are specified to return boolean in comp-known-type-specifiers but actually may return other values as well:
proper-list-p
buffer-modified-p
coordinates-in-window-p
custom-variable-p
file-locked-p
file-symlink-p
frame-visible-p
framep
and, since we have no guarantees about what file handlers actually return,
file-directory-p
file-exists-p
file-newer-than-file-p
file-readable-p
file-writable-p
This is just from a quick survey of a small subset of comp-known-type-specifiers, which means that it is difficult to trust in its current state. It can all be corrected but it is slow and tedious work.
next prev parent reply other threads:[~2023-06-01 13:06 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 16:44 Inferred function types in the *Help* buffer Andrea Corallo
2023-05-24 10:46 ` Eli Zaretskii
2023-05-24 12:19 ` Andrea Corallo
2023-05-30 16:46 ` Andrea Corallo
2023-05-30 18:14 ` Mattias Engdegård
2023-05-30 18:48 ` Andrea Corallo
2023-05-31 12:19 ` Andrea Corallo
2023-05-31 14:08 ` Eli Zaretskii
2023-06-01 11:28 ` Mattias Engdegård
2023-06-01 11:35 ` Eli Zaretskii
2023-06-01 11:36 ` Mattias Engdegård
2023-06-01 11:54 ` Andrea Corallo
2023-06-01 11:50 ` Andrea Corallo
2023-06-01 13:06 ` Mattias Engdegård [this message]
2023-06-01 13:34 ` Andrea Corallo
2023-06-01 14:50 ` Mattias Engdegård
2023-06-01 15:10 ` Andrea Corallo
2023-06-01 17:53 ` Mattias Engdegård
2023-06-01 19:13 ` Andrea Corallo
2023-06-01 14:09 ` Andrea Corallo
2023-05-31 13:46 ` Eli Zaretskii
2023-06-01 8:42 ` Andrea Corallo
2023-06-01 8:53 ` Eli Zaretskii
-- strict thread matches above, loose matches on Subject: below --
2023-05-23 16:47 Payas Relekar
2023-05-23 18:51 ` Philip Kaludercic
2023-05-24 12:20 ` Andrea Corallo
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=B3F717B8-A234-4C6A-BB35-B633CFE3854D@gmail.com \
--to=mattias.engdegard@gmail.com \
--cc=acorallo@gnu.org \
--cc=akrl@sdf.org \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
/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.