From: "Tommi Höynälänmaa" <tommi.hoynalanmaa@gmail.com>
To: guile-user@gnu.org
Subject: Global variables and declarative modules
Date: Fri, 1 Nov 2024 17:22:19 +0200 [thread overview]
Message-ID: <1c0fb694-bd70-59fc-aaca-c252fdbdd918@gmail.com> (raw)
Suppose we have module a that defines a global variable:
---
(define-module (a))
(export my-global-var)
(define my-global-var #f)
---
and module b that uses the global variable and changes it:
---
(define-module (b))
(use-modules (a))
(define (my-proc)
(set! my-global-var 100)
(display my-global-variable))
---
Is it so that module a can't be marked declarative?
- Tommi Höynälänmaa
--
Kotisivu / Homepage: http://www.iki.fi/tohoyn/
Sähköposti / E-Mail: tommi.hoynalanmaa@iki.fi
GPG-sormenjälki / GPG fingerprint:
55F4 2477 7155 3528 5CB2 2B7A BB86 1FDE 4046 0F83
FT, Debian-ylläpitäjä / PhD, Debian Maintainer
reply other threads:[~2024-11-01 15:22 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
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=1c0fb694-bd70-59fc-aaca-c252fdbdd918@gmail.com \
--to=tommi.hoynalanmaa@gmail.com \
--cc=guile-user@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).