Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (22 Dec 2010 20:47 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? John Cowan (23 Dec 2010 01:49 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (23 Dec 2010 08:25 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? John Cowan (23 Dec 2010 09:13 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Peter Kourzanov (23 Dec 2010 09:26 UTC)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
(missing)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Peter Kourzanov (23 Dec 2010 09:28 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Andre van Tonder (23 Dec 2010 15:11 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? John Cowan (24 Dec 2010 01:14 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Eli Barzilay (24 Dec 2010 01:40 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 08:55 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? John Cowan (24 Dec 2010 09:20 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 09:26 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? John Cowan (25 Dec 2010 00:32 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Adrien "Pied" Piérard (24 Dec 2010 11:51 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 12:49 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Eli Barzilay (24 Dec 2010 16:04 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Andre van Tonder (24 Dec 2010 18:33 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Adrien "Pied" Piérard (27 Dec 2010 01:59 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? John Cowan (27 Dec 2010 05:51 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Adrien "Pied" Piérard (27 Dec 2010 06:22 UTC)
Re: [Scheme-reports] [r6rs-discuss] case reborn Peter Kourzanov (27 Dec 2010 09:55 UTC)
Re: [Scheme-reports] [r6rs-discuss] do we need to redefine eqv? Peter Kourzanov (29 Dec 2010 12:54 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 12:24 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Eli Barzilay (24 Dec 2010 16:02 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 18:17 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Andre van Tonder (24 Dec 2010 18:44 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Andre van Tonder (24 Dec 2010 18:40 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Peter Kourzanov (24 Dec 2010 20:07 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? John Cowan (24 Dec 2010 20:40 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (24 Dec 2010 22:11 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Shiro Kawai (24 Dec 2010 22:27 UTC)
Re: [Scheme-reports] [r6rs-discuss] redefining eqv? Peter Kourzanov (25 Dec 2010 00:48 UTC)
Re: [r6rs-discuss] [Scheme-reports] redefining eqv? John Cowan (25 Dec 2010 00:29 UTC)

Re: [r6rs-discuss] [Scheme-reports] redefining eqv? Eli Barzilay 24 Dec 2010 01:39 UTC

Earlier today, Peter Kourzanov wrote:
> On Wed, 2010-12-22 at 18:36 -0500, Eli Barzilay wrote:
>
> > You're confusing (or mixing) a local binding (let ((eqv? ...)) ...)
> > with an implicit mutation (define eqv? ...).
>
> Is it?

...an implicit muatation?  Yes.
...so different?  Yes.
...a confusion?  Thats how it seems.

> The way I read R6RS, (define) is supposed to (#1) allocate a new
> location for this new eqv?, (#2) set! the result of the expression
> to it and (#3) mutate the *binding* for eqv? in the environment (or
> splice into parent environment when enclosed by begin). At least,
> that's what it typically does for other variables. I.e.,

That's r5rs w/out any module system.  Not r6rs (in a library).

> And, BTW, 11.3 says that (define) is equivalent to (letrec*). So why
> are these cases so different then?

Because those are internal definitions.

> I guess if R6RS enforced macro-implementation of (case), like
> Haskell's Prelude, the problem would be solved (via syntactic
> closures provided by hygiene & referential transparency of
> syntax-rules).

??

> Alternatively, if you add lazy evaluation of (case) bodies (or
> simulate that with delimited continuations, whatever), you can also
> solve it by using hygiene & referential transparency of functional
> closures with lexical scope. But that is a different language
> altogether too...

I hope that I'm making a mistake here, but it looks like you're
seriously suggesting something like:

  (let ((old-eqv? eqv?))
    (set! eqv? equal?)
    (let ((r (case ...)))
      (set! eqv? old-eqv?)
      r))

as a way to get a customizable `case'.  (I'll avoid expressing an
opinion on such a thing, in case this is a mistake.)

> > > And should we do anything about it? [...]
> >
> > Depends on how "we" is defined.
>
> I am interested in this mostly from the user perspective. I don't
> know how many users are hanging around here, but I do hope this set
> is at least as large as the set of implementors...

I'm speaking only as a user, who will need to avoid food 24 hours
prior to any work on code like tha above.

> P.S. And I have no problem in (case) using redefined eqv? as you
>      might probably have guessed. I think implementations should be
>      free to make it (optionally) strict, disallowing rebinding of
>      any standard keyword, maybe with define-immutable-binding.
>      Otherwise there must be a way to shoot yourself in the foot.

Oy.

Earlier today, Peter Kourzanov wrote:
>
> Still returning to Scheme, I would like to be also in control
> concerning eqv?, [...] when I don't care about exact semantics and
                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> using something like _syscall when semantics are at stake.

Yeah, I'm most definitely in a very different "we" -- I always care
about "exact semantics" of any code I write, and I certainly hope that
you do too, if you write any code that runs anything I interact with.

--
          ((lambda (x) (x x)) (lambda (x) (x x)))          Eli Barzilay:
                    http://barzilay.org/                   Maze is Life!

_______________________________________________
r6rs-discuss mailing list
r6rs-discuss@lists.r6rs.org
http://lists.r6rs.org/cgi-bin/mailman/listinfo/r6rs-discuss