[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] [r6rs-discuss] redefining eqv?
Three hours ago, Peter Kourzanov wrote:
> On Wed, 2010-12-22 at 13:34 -0500, Eli Barzilay wrote:
> > > Yes: Bigloo, STklos, and Scheme 9 all have this problem.
> >
> > (I even have the first, but didn't try it...) I still consider it
> > a plain bug, with the given the r[56]rs definition.
>
> Frankly speaking R*RS is very silent on this: I couldn't find any
> hard statement that eqv? should not be allowed to be redefined.
You're confusing (or mixing) a local binding (let ((eqv? ...)) ...)
with an implicit mutation (define eqv? ...). The former is very
clearly a bug -- for example, in the case of `case' the description is
saying "in the sense of `eqv?'", so it doesn't matter how the form is
implemented, it should be following the r5rs text -- and that text is
certainly not something that should change with a local binding of
`eqv?'. (I'd imagine some very explicit mention of this if this was
the intention.)
> Somehow enforcing this is a very un-Schemey thing to do... [...]
If you're talking about enforcing the same equality as `eqv?' whenever
"the sense of `eqv?'" is used (which, IIRC, appears many times)
despite of local names -- then I strongly disagree with it being
"un-Schemey". Without that you get some insane language where nothing
is reliable.
> > So not only do I not see an argument for some missing
> > specification here, I see an argument for why the R5RS thing of
> > overwriting global bindings is an insane feature.
>
> That, I think, is a side effect of R*RS shifting focus from
> interpreter semantics (where override of a global binding has
> application-wide effects) to compiler semantics (where a snapshot of
> global bindings are made at the time when a module is compiled).
There are compilers that implement these so called "interpreter
semantics" and interactive repls that implement these "compiler
semantics", so I don't see any argument here. In addition, there is
no "snapshot" that is needed -- a library/module/whatever is usually
defined as a lexical scope, not as a snapshot.
Three hours ago, Peter Kourzanov wrote:
> On Wed, 2010-12-22 at 15:15 -0500, John Cowan wrote:
>
> > The problem's a mess.
>
> Can we do anything about it in the interpreter besides
> special-casing a whole bunch of functions from the base library?
Yes. See R6RS.
> And should we do anything about it? [...]
Depends on how "we" is defined.
--
((lambda (x) (x x)) (lambda (x) (x x))) Eli Barzilay:
http://barzilay.org/ Maze is Life!
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports