Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Why is (eqv? g g) unspecified in R6RS when g is a procedure?
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
John Cowan  
View profile  
 More options May 9 2012, 3:02 pm
Newsgroups: comp.lang.scheme
From: John Cowan <johnwco...@gmail.com>
Date: Wed, 9 May 2012 12:02:39 -0700 (PDT)
Local: Wed, May 9 2012 3:02 pm
Subject: Re: Why is (eqv? g g) unspecified in R6RS when g is a procedure?

On Wednesday, May 9, 2012 2:29:47 AM UTC-4, Michael Sperber wrote:
> (eqv? (lambda (x) (+ x 1)) (lambda (x) (+ x 1)))

> This is the kind of program transformation we wanted to allow in R6RS.
> Since one expression has become two, you also generally get two
> evaluations of `lambda' expressions, and, hence, two objects that are
> not `eqv?'.

As I pointed out, this bites both ways: given this expression, a compiler
may notice that the two expressions are both pure and identical, and reduce
the whole thing to just #t.

> >     (memv cdr (list car cdr cons)) => #f rather than a list of two elements

> This example, I believe, specifically used simple primitives,

I actually invented this example myself, so I used primitives only to keep
it short.  But perhaps I chose better than I knew.

> Does this help?

Well, it explains the motivation well enough.  Unfortunately, we are still
stuck with the issue: procedures are supposed to be first-class in Scheme,
but when you put them into a data structure, you can't be sure of getting
them out again.  In the Lambda Order, that's not supposed to happen.

> Historical aside: Prior to R6RS, the ML people had ridiculed us for
> years for the old behavior of `eqv?'.

Ah, language design by competitive insults!  If I'd known that was the
proper procedure, it would have made my R7RS efforts so much easier....

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.