[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Scheme-reports] [r6rs-discuss] redefining eqv?



On Fri, 24 Dec 2010, Eli Barzilay wrote:

> The only thing that looks close to a reason is your desire to be able
> to customize the equality that it uses -- yet this doesn't require
> forcing a macro implementation.  For example, the text could replace
>
>  in the sense of `eqv?'
>
> with
>
>  in the sense of the current lexical binding for `eqv?'
>
> and you get your kind of customization hook without a requirement on
> the implementation.
>
> As for the hook itself, there is first the question of why a hook is
> needed, and then there's how it should be implemented.  The solution
> of mutating `eqv?' is pretty horrible IMO -- and it's worse when you
> actually want to do this by a `define'.  If anything, you should go
> with advocating a plain `set!' which would clarify that you really
> want some more "hook-ish" name like `current-equality', and better to
> use some feature that avoids race conditions for threaded
> implementations (eg, racket parameters).

Yes.

Peter, the better way to do the kind of thing you are looking for
is PARAMETERIZE.  I wouldn't advocate it for CASE, though.

Andre


_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports