From: Noah Lavine <noah.b.lavine@gmail.com>
To: Stefan Israelsson Tampe <stefan.itampe@gmail.com>
Cc: guile-devel <guile-devel@gnu.org>
Subject: Re: redo-safe-variables and redo-safe-parameters
Date: Wed, 27 Mar 2013 11:29:39 -0400 [thread overview]
Message-ID: <CA+U71=P6pg1ztTe0m_cwM9AyFyDUoV0PEu+CMjRyQ70gHeUJbA@mail.gmail.com> (raw)
In-Reply-To: <CAGua6m3KB20VTtn2DoqWQiZoP1-vUWJuXwhGpkaE9+BAt3yXXQ@mail.gmail.com>
[-- Attachment #1: Type: text/plain, Size: 1786 bytes --]
On Wed, Mar 27, 2013 at 11:04 AM, Stefan Israelsson Tampe <
stefan.itampe@gmail.com> wrote:
> Hi Noha,
>
> On Wed, Mar 27, 2013 at 3:29 PM, Noah Lavine <noah.b.lavine@gmail.com>
> wrote:
> > Hello,
> >
> >
> > On Wed, Mar 27, 2013 at 9:22 AM, Stefan Israelsson Tampe
> > <stefan.itampe@gmail.com> wrote:
>
> I don't understand the difference. If I use ~, I get redo-safe behavior,
> and
> > if I use !, I get regular behavior (value shared between dynamic states).
> > Can I use ~ and ! on the same variable at different places in the code?
> If
> > yes, doesn't it have to switch behavior?
>
> using set! means that you basically destroys the redo safe property.
> There is no sound concept where you mix them. If you want to mix them
> use ~ and add correct function guards to describe the semantics.
> ...
>
You want to allow a user to let one variable behave as with set! and one as
> with
> set~. It is not broken, the useres sees ~ on one of the varibles and !
> on the other.
>
Yes, I agree. What I'm saying is, there should be two different ways to
declare the variables, and once a variable is declared, you should not need
to look elsewhere in the code to see whether it acts like a regular or
redo-safe variable. If that is what you specified, I apologize, but I
thought that it wasn't.
In particular, I think that having an MIT-Scheme-style fluid-let will do
the right thing here. I would be interested in talking about its
interaction with closure variables, but I think that it's the right thing
here with regard to continuations and mutable state.
> BTW. srfi's shouuld be careful about specifying dynamic state in order
> to achieve thread safe concpets, Scheme48 is threadsafe with their
> fluid-let, guile would not be.
>
Yes, that's an interesting point.
Noah
[-- Attachment #2: Type: text/html, Size: 2919 bytes --]
next prev parent reply other threads:[~2013-03-27 15:29 UTC|newest]
Thread overview: 26+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-26 17:40 redo-safe-variables and redo-safe-parameters Stefan Israelsson Tampe
2013-03-26 18:05 ` Noah Lavine
2013-03-26 20:43 ` Stefan Israelsson Tampe
2013-03-26 21:07 ` Noah Lavine
[not found] ` <CAGua6m0WyG2_Bk3+b8UDn6ee=mddmmaOPQiF9sJf+jYtE3LsgQ@mail.gmail.com>
2013-03-26 21:38 ` Noah Lavine
2013-03-26 22:01 ` Stefan Israelsson Tampe
2013-03-26 22:36 ` Noah Lavine
2013-03-27 7:13 ` Stefan Israelsson Tampe
2013-03-27 12:42 ` Noah Lavine
2013-03-27 13:22 ` Stefan Israelsson Tampe
2013-03-27 14:29 ` Noah Lavine
2013-03-27 15:04 ` Stefan Israelsson Tampe
2013-03-27 15:29 ` Noah Lavine [this message]
2013-03-27 16:15 ` Stefan Israelsson Tampe
2013-03-27 21:44 ` Noah Lavine
2013-03-27 21:46 ` Noah Lavine
2013-03-28 8:36 ` Stefan Israelsson Tampe
2013-03-27 21:37 ` Stefan Israelsson Tampe
2013-03-28 18:03 ` Stefan Israelsson Tampe
2013-03-31 21:16 ` Stefan Israelsson Tampe
2013-04-01 1:23 ` Noah Lavine
2013-04-01 1:37 ` Daniel Hartwig
-- strict thread matches above, loose matches on Subject: below --
2013-04-01 10:17 Stefan Israelsson Tampe
2013-04-03 19:36 Stefan Israelsson Tampe
2013-04-13 10:12 ` Stefan Israelsson Tampe
2013-04-04 21:13 Stefan Israelsson Tampe
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='CA+U71=P6pg1ztTe0m_cwM9AyFyDUoV0PEu+CMjRyQ70gHeUJbA@mail.gmail.com' \
--to=noah.b.lavine@gmail.com \
--cc=guile-devel@gnu.org \
--cc=stefan.itampe@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).