From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Maxime Devos Newsgroups: gmane.lisp.guile.devel Subject: =?utf-8?Q?RE:_Making_code_compatible_with_different_versions_of_Guile?= =?utf-8?Q?=E2=80=94_#:declarative=3F?= Date: Sat, 7 Sep 2024 19:46:46 +0200 Message-ID: <20240907194646.9Vmm2D0052h9R1001VmmdK@baptiste.telenet-ops.be> References: <87plpfwenn.fsf@web.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="_9DBBD06B-1AAF-44B7-A3C3-2F24B6B85825_" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="3941"; mail-complaints-to="usenet@ciao.gmane.io" To: "Dr. Arne Babenhauserheide" , "guile-devel@gnu.org" Original-X-From: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Sat Sep 07 19:52:18 2024 Return-path: Envelope-to: guile-devel@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1smzbc-0000pb-Ox for guile-devel@m.gmane-mx.org; Sat, 07 Sep 2024 19:52:16 +0200 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1smzbP-0007mR-Lj; Sat, 07 Sep 2024 13:52:03 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1smzbO-0007mG-5s for guile-devel@gnu.org; Sat, 07 Sep 2024 13:52:02 -0400 Original-Received: from baptiste.telenet-ops.be ([2a02:1800:120:4::f00:13]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1smzbL-0000fH-Ho for guile-devel@gnu.org; Sat, 07 Sep 2024 13:52:01 -0400 Original-Received: from [IPv6:2a02:1811:8c0e:ef00:9d6e:7597:bceb:1b19] ([IPv6:2a02:1811:8c0e:ef00:9d6e:7597:bceb:1b19]) by baptiste.telenet-ops.be with cmsmtp id 9Vmm2D0052h9R1001VmmdK; Sat, 07 Sep 2024 19:46:46 +0200 Importance: normal X-Priority: 3 In-Reply-To: <87plpfwenn.fsf@web.de> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=telenet.be; s=r24; t=1725731207; bh=daWgx74JpstSHwMJEMZxWG1MZofmmvD593fy7f8siJI=; h=Message-ID:MIME-Version:To:From:Subject:Date:In-Reply-To: References:Content-Type:From; b=iBqB9C81Sv8pW2Pmo/+8sK0RmsMTZP5BTyiO8dub92ecxEy1U1UWyIpH9MvNHyKCi Bt2vf6YK2fKJU/NntC+0bq00R0bZDPmYb3ahFuORy9nWcJm/aw7rGS0Ckt0d+Oj1QZ UwK7O2LyFkIj8rGGPgPXfaWZQeI1xc9BHGO61XF2Ez6ebWXxeUNB9DB74yRxQiPqtV 9peEQsejsNFx8VZk2dGqGu+15dTzPiklkQzl9LIT1KOByeZ9WMkA4WpkEvTZJ0G2Jf bvz8UlYAiwVC4bCceIB/XzjfTSmkk4p9E2oXgjgSBTrrD9j0wovuuJMM6pJMvq2jzD UqdW7tdwWGJNQ== Received-SPF: pass client-ip=2a02:1800:120:4::f00:13; envelope-from=maximedevos@telenet.be; helo=baptiste.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, HTML_MESSAGE=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.lisp.guile.devel:22678 Archived-At: --_9DBBD06B-1AAF-44B7-A3C3-2F24B6B85825_ Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" >[...] >The main problem for me was #:declarative? =E2=80=94 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 variabl= e of the module makes the module non-declarative by default, but please che= ck the manual for details (there is some information on this, I don=E2=80= =99t 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 =E2=80=98foo= =E2=80=99 with an updated version is concerned), both in past, present and = future. (No comment on what the default _should_ be.) Best regards, Maxime Devos. --_9DBBD06B-1AAF-44B7-A3C3-2F24B6B85825_ Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset="utf-8"

>[...]

>The main problem= for me was #:declarative? =E2=80=94 a real showstopper.<= /p>

> 

=

> To get the same behavior for m= utating module bindings in Guile 3 and in

Guile 2 (for example for live development or fo= r changing a function;

having a live REPL in Chickadee and building a game iteratively is= a

great exper= ience), I must mark the module as non-declarative:

 

>(define-module (my-module)

>=C2=A0 #:declarative? = #f)

 = ;

IIRC doing (set! = some-variable some-variable) on the top-level on a variable of the module m= akes the module non-declarative by default, but please check the manual for= details (there is some information on this, I don=E2=80=99t recall the nam= e of the section).

 

In= particular, I would expect

 

(define (foo ...) ...)

<= span lang=3Den-BE>(set! foo foo)

=  

to have the desired properties (at least as far as replacing = =E2=80=98foo=E2=80=99 with an updated version is concerned), both in past, = present and future.

 

(= No comment on what the default _should_ be.)

 

Best regards,

Maxime Devos.

= --_9DBBD06B-1AAF-44B7-A3C3-2F24B6B85825_--