From: ludo@gnu.org (Ludovic Courtès)
To: guile-devel@gnu.org
Subject: Re: Mutable top-level bindings
Date: Sat, 20 Apr 2013 16:00:32 +0200 [thread overview]
Message-ID: <87txn18fpb.fsf@gnu.org> (raw)
In-Reply-To: 20130417152753.GA13533@lotus.destinee.acro.gen.nz
"Chris K. Jester-Young" <cky944@gmail.com> skribis:
> On Mon, Apr 15, 2013 at 10:00:55PM -0400, Mark H Weaver wrote:
>> Unfortunately, this is rarely possible in a language like Scheme, where
>> calls to procedures bound by mutable top-level variables are frequent.
>> We cannot fix this without making most commonly-used top-level bindings
>> immutable. Last I checked, there was strong resistance to this idea.
>
> Maybe it's time to reopen this (and hope it's not a can of worms). :-)
>
> With a proper module system, I don't see why top-level bindings should
> be mutable.
[...]
> Yes, this does disable the ability to perform monkey-patching. I don't
> see this as a big loss, but perhaps there are legitimate use cases for
> monkey-patching that I haven't thought of.
Several uses cases would need to be addressed:
- Uses of ‘set!’ for bootstrapping purposes as in boot-9.scm (I found
myself using a similar idiom in
<http://git.sv.gnu.org/cgit/libchop.git/tree/guile2/chop/internal.scm>
because I couldn’t come up with another approach.)
- Patching, as in
<http://git.sv.gnu.org/cgit/guix.git/tree/guix/build/download.scm#n173>,
where we’re able to work around a Guile bug without actually
bundling a copy of the fixed module.
- Live development (with Geiser), as Mark noted. ProofGeneral does
something interesting, where evaluated forms become immutable in the
file, and have to be “de-evaluated” in reverse order to become
mutable again. That provides additional consistency guarantees, but
remains far less flexible than what Scheme has to offer.
> Another thing we will need to provide is define-values,
+1
Thanks,
Ludo’.
prev parent reply other threads:[~2013-04-20 14:00 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <mailman.1288755.1365813667.854.guile-devel@gnu.org>
2013-04-15 11:29 ` vectors are something else Daniel Llorens
2013-04-15 12:28 ` Daniel Hartwig
2013-04-15 14:08 ` Daniel Llorens
2013-04-15 14:17 ` Daniel Hartwig
2013-04-15 14:10 ` vector types poll Daniel Llorens
2013-04-15 22:47 ` Daniel Hartwig
2013-04-16 0:16 ` Daniel Llorens
2013-04-16 2:00 ` vectors are something else Mark H Weaver
2013-04-16 4:10 ` Daniel Llorens
2013-04-16 6:19 ` Mark H Weaver
2013-04-16 8:31 ` Daniel Llorens
2013-04-17 15:29 ` Mutable top-level bindings (was: vectors are something else) Chris K. Jester-Young
2013-04-17 17:53 ` Mutable top-level bindings Mark H Weaver
2013-04-17 20:25 ` Ian Price
2013-04-20 14:00 ` Ludovic Courtès [this message]
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=87txn18fpb.fsf@gnu.org \
--to=ludo@gnu.org \
--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).