GNU bug report logs -
#14039
Bug in with-fluids semantics
Previous Next
Full log
Message #25 received at 14039-close <at> debbugs.gnu.org (full text, mbox):
I got the impression (on irc) that you thought backtracking would be
compromised with
my fix. Not so. It's the other half of the swap that should be skiped.
All semantics referring
to situations where a continuation is used one or zero times is preserved.
Consider a fluid a, with value v and storage s
the swap used on wind and non local unwind and currently on return unwind
-------------
temp <- v
v <- s
s <- temp
Suggestion for the return unwind:
v <- s
E.g. we will backtrack to the old value before but not store the
current value in s.
It's true that the semantic is different. I would really say that we
need to have both implemented.
I would argue that my solution should be default. But I can live with
it being a separate construct
only that it will have support in the VM to get sane behavior in logic programs.
/Stefan
On Sat, Mar 23, 2013 at 8:07 PM, Andy Wingo <wingo <at> pobox.com> wrote:
> On Sat 23 Mar 2013 11:41, Stefan Israelsson Tampe <stefan.itampe <at> gmail.com> writes:
>
>> The reason is that when the with-fluid returns normally it does a full
>> swap. It should only do half a swap e.g. restore the old value of the
>> fluid and not store the current which is of non use because it can not
>> be reached anymore and it contaminates the continuation k.
>
> That's not how fluids work, semantically: for better (I think) or for
> worse (you think). We cannot change this.
>
> A
> --
> http://wingolog.org/
This bug report was last modified 12 years and 119 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.