From: "Thompson, David" <dthompson2@worcester.edu>
To: "Tommi Höynälänmaa" <tommi.hoynalanmaa@gmail.com>
Cc: Guile User <guile-user@gnu.org>
Subject: Re: Setting variables in declarative modules
Date: Fri, 1 Nov 2024 09:20:02 -0400 [thread overview]
Message-ID: <CAJ=RwfZVcimua4EeNSWn4LR5k-SJ1_dt+ukA0=vNRWt+Z5-9dw@mail.gmail.com> (raw)
In-Reply-To: <CAAkPRiyFeUF8xcwr=58MoX-FGsMh7gvO_GLWndmTK3WqzT2tug@mail.gmail.com>
Hi Tommi,
On Thu, Oct 31, 2024 at 10:30 PM Tommi Höynälänmaa
<tommi.hoynalanmaa@gmail.com> wrote:
>
> Suppose that I have the following code in a Guile module:
> ---
> (define fw-proc #f)
>
> (define (my-proc x)
> (display (fw-proc x)))
>
> (define (fw-proc x)
> (cons x x))
> ---
>
> Can I declare the module as declarative?
Yes, this is fine. If you put this in a module file and compile it,
Guile does not issue any warnings. `define` is not `set!`. (Modules
are declarative by default, btw.)
- Dave
next prev parent reply other threads:[~2024-11-01 13:20 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-11-01 2:29 Setting variables in declarative modules Tommi Höynälänmaa
2024-11-01 13:20 ` Thompson, David [this message]
2024-11-01 15:28 ` Mikael Djurfeldt
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='CAJ=RwfZVcimua4EeNSWn4LR5k-SJ1_dt+ukA0=vNRWt+Z5-9dw@mail.gmail.com' \
--to=dthompson2@worcester.edu \
--cc=guile-user@gnu.org \
--cc=tommi.hoynalanmaa@gmail.com \
/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).