unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* Making code compatible with different versions of Guile — #:declarative?
@ 2024-09-07 17:35 Dr. Arne Babenhauserheide
  2024-09-07 17:46 ` Making code compatible with different versions of Guile— #:declarative? Maxime Devos
  0 siblings, 1 reply; 3+ messages in thread
From: Dr. Arne Babenhauserheide @ 2024-09-07 17:35 UTC (permalink / raw)
  To: guile-devel

[-- 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 --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-09-10 12:41 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-09-07 17:35 Making code compatible with different versions of Guile — #:declarative? Dr. Arne Babenhauserheide
2024-09-07 17:46 ` Making code compatible with different versions of Guile— #:declarative? Maxime Devos
2024-09-10 12:41   ` Damien Mattei

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).