[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] Fwd: R7RS
- To: Gerald Jay Sussman <gjs@x>
- Subject: Re: [Scheme-reports] Fwd: R7RS
- From: Andy Wingo <wingo@x>
- Date: Tue, 30 Apr 2013 00:21:27 +0200
- Cc: scheme-reports <scheme-reports@x>
- In-reply-to: <CALnw4L+rM4CT=Na4Uavx00RcL8TRNaSsUqVXKwD2Yvv_VTwC9Q@mail.gmail.com> (Arthur A. Gleckler's message of "Mon, 29 Apr 2013 10:18:58 -0700")
- References: <CALnw4LKNGWJWUDdP2AShRXdmi+dvESzZOu-0YqCJUgrJrsJNyw@mail.gmail.com> <E1UWfsp-0001f7-GX@gjs-x1> <CALnw4LJJExD2FQ3Md4vPP+r4kDOwrcR15mXrGxEb_PpGrzGw6w@mail.gmail.com> <CALnw4L+rM4CT=Na4Uavx00RcL8TRNaSsUqVXKwD2Yvv_VTwC9Q@mail.gmail.com>
Hi Gerald,
I had the very brief pleasure of meeting you at the International Lisp
Conference in 2009. I trust all is well. I co-maintain Guile these
days.
On Mon 29 Apr 2013 19:18, "Arthur A. Gleckler" <scheme@x> writes:
> (let ((p (lambda (x) x))) ==> unspecified
> (eqv? p p))
>
> is inconsistent with the intended meaning of eqv?.
>
> [... interesting points elided ...]
>
> By the way, which implementation does this? Why?
This clause was present in R6RS. Its provenance is somewhat unclear.
It was discussed last year, and Will Clinger justified it with this
rationale:
http://lists.r6rs.org/pipermail/r6rs-discuss/2012-May/006369.html
However, I think that the particular example he gave was permissible
with R5RS semantics.
The advantage of this transformation is to allow better optimization.
Inlining is copy-propagation on procedural values. If you treat all
procedures as copyable, you might find a beta-reduction that you
wouldn't see otherwise. But if you have to treat all procedures as
closures with identity unless proven otherwise, you might miss out on
optimization opportunities.
Larceny probably uses this transformation in R6RS mode. I think Chez
uses it too. I believe that Guile does it as well, though it is hard to
provoke a case in which it is observable.
It pains me to admit it but you might be right on this point. With this
eqv? specification, closures are not at all a poor man's object -- at
least, if you treat identity as one of the essential characteristics of
objects.
I would appreciate thoughts of others on scheme-reports, and links to
other rationales as appropriate.
Regards,
Andy
--
http://wingolog.org/
_______________________________________________
Scheme-reports mailing list
Scheme-reports@x
http://lists.scheme-reports.org/cgi-bin/mailman/listinfo/scheme-reports