unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
From: Maxime Devos <maximedevos@telenet.be>
To: "Dr. Arne Babenhauserheide" <arne_bab@web.de>,
	 "guile-devel@gnu.org" <guile-devel@gnu.org>
Subject: RE: Making code compatible with different versions of Guile— #:declarative?
Date: Sat, 7 Sep 2024 19:46:46 +0200	[thread overview]
Message-ID: <20240907194646.9Vmm2D0052h9R1001VmmdK@baptiste.telenet-ops.be> (raw)
In-Reply-To: <87plpfwenn.fsf@web.de>

[-- Attachment #1: Type: text/plain, Size: 974 bytes --]

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

IIRC doing (set! some-variable some-variable) on the top-level on a variable of the module makes the module non-declarative by default, but please check the manual for details (there is some information on this, I don’t recall the name of the section).

In particular, I would expect

(define (foo ...) ...)
(set! foo foo)

to have the desired properties (at least as far as replacing ‘foo’ with an updated version is concerned), both in past, present and future.

(No comment on what the default _should_ be.)

Best regards,
Maxime Devos.

[-- Attachment #2: Type: text/html, Size: 3336 bytes --]

  reply	other threads:[~2024-09-07 17:46 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-09-07 17:35 Making code compatible with different versions of Guile — #:declarative? Dr. Arne Babenhauserheide
2024-09-07 17:46 ` Maxime Devos [this message]
2024-09-10 12:41   ` Making code compatible with different versions of Guile— #:declarative? 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=20240907194646.9Vmm2D0052h9R1001VmmdK@baptiste.telenet-ops.be \
    --to=maximedevos@telenet.be \
    --cc=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).