From: "Dr. Arne Babenhauserheide" <arne_bab@web.de>
To: guile-devel@gnu.org
Subject: Making code compatible with different versions of Guile — #:declarative?
Date: Sat, 07 Sep 2024 19:35:08 +0200 [thread overview]
Message-ID: <87plpfwenn.fsf@web.de> (raw)
[-- Attachment #1: Type: text/plain, Size: 1326 bytes --]
Hi,
In the past year I often had to make code work on different versions on
Guile. Either because my laptop has a different distribution than my
Desktop (Trisquel vs. Guix) or because my server has yet another
distribution and may be on Debian stable (or oldstable).
The main problem for me was #:declarative? — a real showstopper.
To get the same behavior for mutating module bindings in Guile 3 and in
Guile 2 (for example for live development or for changing a function;
having a live REPL in Chickadee and building a game iteratively is a
great experience), I must mark the module as non-declarative:
(define-module (my-module)
#:declarative? #f)
But #:declarative? is illegal in Guile 2.x, so I have to use different
code for 2.x and 3.x. And hitting that when I try to run a program on
another system is a really bad experience.
The problem is that #:declarative? is #true by default in Guile 3. But I
cannot change it if my code should work for Guile 2 *and* for Guile 3.
Would it be an alternative to explicitly mark all modules shipped with
Guile as #:declarative? #t but have user-code non-declarative by
default? Would that already yield most of the performance improvements?
Best wishes,
Arne
--
Unpolitisch sein
heißt politisch sein,
ohne es zu merken.
draketo.de
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 1125 bytes --]
next reply other threads:[~2024-09-07 17:35 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-09-07 17:35 Dr. Arne Babenhauserheide [this message]
2024-09-07 17:46 ` Making code compatible with different versions of Guile— #:declarative? Maxime Devos
2024-09-10 12:41 ` Damien Mattei
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=87plpfwenn.fsf@web.de \
--to=arne_bab@web.de \
--cc=guile-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.
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).