unofficial mirror of guile-devel@gnu.org 
 help / color / mirror / Atom feed
* proposal: deprecate dynamic states
@ 2014-03-09 17:33 Andy Wingo
  2014-03-09 21:55 ` Mark H Weaver
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Andy Wingo @ 2014-03-09 17:33 UTC (permalink / raw)
  To: guile-devel

Hi,

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.

Andy
-- 
http://wingolog.org/



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: proposal: deprecate dynamic states
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Mark H Weaver @ 2014-03-09 21:55 UTC (permalink / raw)
  To: Andy Wingo; +Cc: guile-devel

Hi Andy,

Andy Wingo <wingo@pobox.com> 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.

I strongly agree with this.

> If no one objects, I'll push something that does this in the next
> couple days.

Sounds good to me!

     Mark



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: proposal: deprecate dynamic states
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Ludovic Courtès @ 2014-03-10 13:26 UTC (permalink / raw)
  To: guile-devel

Andy Wingo <wingo@pobox.com> skribis:

> 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.

Fine with me!

Ludo’.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: proposal: deprecate dynamic states
  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
  2 siblings, 0 replies; 5+ messages in thread
From: Andy Wingo @ 2016-06-19 15:36 UTC (permalink / raw)
  To: guile-devel

Hi :)

It took more than a couple days, ahem, but let's do this.  Just a
heads-up.

Andy

On Sun 09 Mar 2014 18:33, Andy Wingo <wingo@pobox.com> writes:

> Hi,
>
> 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.
>
> Andy



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: proposal: deprecate dynamic states
@ 2016-06-26 11:26 Josep Portella Florit
  0 siblings, 0 replies; 5+ messages in thread
From: Josep Portella Florit @ 2016-06-26 11:26 UTC (permalink / raw)
  To: wingo; +Cc: guile-devel

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`.



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-06-26 11:26 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2016-06-26 11:26 Josep Portella Florit

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).