From: Josep Portella Florit <jpf@primfilat.com>
To: wingo@pobox.com
Cc: guile-devel@gnu.org
Subject: Re: proposal: deprecate dynamic states
Date: Sun, 26 Jun 2016 13:26:04 +0200 [thread overview]
Message-ID: <a7bdc504-53ce-1a21-2005-66651c66787f@primfilat.com> (raw)
On Sun 09 Mar 2014 18:33, Andy Wingo <address@hidden> writes:
> The manual claims that you can use fluids as thread-local variables,
> but that's not really true -- we expose this strange "dynamic state"
> interface that lets you have one dynamic state used by multiple
> threads. Pretty strange stuff.
>
> Normally I wouldn't be against "extra functionality" but this one
> makes no sense. We need something that is "thread-local state" and
> fluids/parameters should be that thing -- and yet, we are prevented
> from doing by the dynamic state interface. (Of course, that doesn't
> stop us from using fluids in this way; I'm sure there are many bugs
> out there.)
>
> So my proposal is to deprecate the dynamic state interface. It's
> nonstandard, I've never heard of anyone using it, and it's actively
> harmful. If no one objects, I'll push something that does this in
> the next couple days.
Guile's `make-dynamic-state` and `with-dynamic-state` seem to be the
equivalent to Racket's `current-parameterization` and
`call-with-parameterization`. I think this functionality is useful: you
can take a "snapshot" of the parameters to use it later (see my last
message in <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=20938>).
Guile's `current-dynamic-state` doesn't seem to have an equivalent in
Racket. I see it allows you to use the same dynamic state in different
threads, which I agree is strange, given that parameters are meant to be
thread-local variables.
Maybe you should simply deprecate `current-dynamic-state`.
next reply other threads:[~2016-06-26 11:26 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-06-26 11:26 Josep Portella Florit [this message]
-- strict thread matches above, loose matches on Subject: below --
2014-03-09 17:33 proposal: deprecate dynamic states Andy Wingo
2014-03-09 21:55 ` Mark H Weaver
2014-03-10 13:26 ` Ludovic Courtès
2016-06-19 15:36 ` Andy Wingo
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=a7bdc504-53ce-1a21-2005-66651c66787f@primfilat.com \
--to=jpf@primfilat.com \
--cc=guile-devel@gnu.org \
--cc=wingo@pobox.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).