|
From: | Maxime Devos |
Subject: | RE: Making code compatible with different versions of Guile— #:declarative? |
Date: | Sat, 7 Sep 2024 19:46:46 +0200 |
>[...] >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. |
[Prev in Thread] | Current Thread | [Next in Thread] |