From: Skyler Ferris via "Developers list for Guile, the GNU extensibility library" <guile-devel@gnu.org>
To: Maxime Devos <maximedevos@telenet.be>
Cc: "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: RE: Removing program-arities export
Date: Wed, 08 Jan 2025 11:23:14 +0000 [thread overview]
Message-ID: <SXAcjGwx65sJpr5q7TEySKLXOUwnvOt9uAbvk_CmevVze-53BoPFuGvkvnsCQBAcXpUe48uJejSKz2y0iy8IYld4rLMOEcvS1ZA5Tgi5HEg=@skyler-ferris.me> (raw)
In-Reply-To: <tzMSaEifYECKJsWFM5ZZyIiFWwM_3_d0J28rsc8dsDWaX36PyzWw8TDxEMuAuSMRR6NwyBXQZSDePbyLwZsnaao-b--z_kCgykep8abEKUw=@protonmail.com>
(switching to the correct sending address; I was previously sending from skyvine due to a misconfiguration in my client)
It looks like there are 2 potential candidates for aliasing, but both of them have some problems. When aliasing to "find-program-arities" I am unable to get the arity of any procedure which passes the "primitive-code?" predicate; it just returns #f. When aliasing to "program-arguments-alists" I get results for primitive code, but they are not accurate. For example, try calling it on the "count" procedure from SRFI 1. It is using the "fallback" helper which hardcodes unknown values for missing information. Also, the alists it returns do not provide the information needed for "arity:start" and "arity:end".
I believe that program-arguments-alists is the intended replacement for program-arities, based on this timeline of relevant commits:
- eb2bc00fb3863986927f0bade97487209b6d6a5b (16 May 2013): Added program-arguments-alist, commit message states "New helper, implemented also for RTL procedures."
- 27337b6373954e1a975d97d0bf06b5c03d65b64d (18 October 2013): Added fallback logic, commit message states "Fix up various arity-related things for primitives, which don't use ELF arity info."
- 8bd261baaa96eba005517eef5fb8d5d08f22720a (also 18 October 2013): Exported program-arguments-alist, commit message states "Export this interface. Fall back to grovelling through procedure-minimum-arity if the program has no arities, as might be the case for continuations."
- (1c33be992e8120abd20add8021e4d91d226f5b6a, 8 November 2013): Removed program-arities implementation, commit message states "Remove old program code." The header of the commit states "Remove stack programs, objcode, and the old VM."
I have 2 concerns that I want to address. The first concern is the bad user experience created by calling a procedure which is advertised in the manual only to be told that it does not exist. I consider this to be an urgent problem and would like to find a path to fix this quickly. Based on the above I still believe that removing program-arity (and updating the manual accordingly) makes sense. However, if we want to keep this as a separate interface I could do something like throw an error that explicitly states "this is currently unimplemented, we are aware of the problem and are looking at it." I don't have a strong opinion about keeping it or removing it. I just want to make sure that callers have a good experience with whatever APIs exist.
The second concern is ensuring that arity information is available for all procedures. However, I would like to delay that discussion until after I spend more time studying how different programming languages handle arguments.
next prev parent reply other threads:[~2025-01-08 11:23 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-29 11:16 Removing program-arities export Skyler via Developers list for Guile, the GNU extensibility library
2025-01-05 18:07 ` Maxime Devos
2025-01-06 11:01 ` Skyler via Developers list for Guile, the GNU extensibility library
2025-01-08 11:23 ` Skyler Ferris via Developers list for Guile, the GNU extensibility library [this message]
2025-01-08 20:21 ` yeRemoving " Dr. Arne Babenhauserheide
2025-01-09 9:53 ` Skyler Ferris via Developers list for Guile, the GNU extensibility library
2025-01-15 8:44 ` Skyler Ferris via Developers list for Guile, the GNU extensibility library
2025-01-15 9:47 ` Removing " Maxime Devos
2025-01-15 11:10 ` Skyler Ferris via Developers list for Guile, the GNU extensibility library
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
List information: https://www.gnu.org/software/guile/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='SXAcjGwx65sJpr5q7TEySKLXOUwnvOt9uAbvk_CmevVze-53BoPFuGvkvnsCQBAcXpUe48uJejSKz2y0iy8IYld4rLMOEcvS1ZA5Tgi5HEg=@skyler-ferris.me' \
--to=guile-devel@gnu.org \
--cc=dev@skyler-ferris.me \
--cc=maximedevos@telenet.be \
/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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).