[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Scheme-reports] "unspecified values"
- To: Alex Shinn <alexshinn@x>
- Subject: Re: [Scheme-reports] "unspecified values"
- From: Andre van Tonder <andre@x>
- Date: Sat, 21 May 2011 11:13:08 -0400 (EDT)
- Cc: scheme-reports@x
- In-reply-to: <BANLkTin5W6w+RLHjvM=o8Rz2+8u4YJWWOw@mail.gmail.com>
- References: <firstname.lastname@example.org> <4DD540F3.email@example.com> <firstname.lastname@example.org> <BANLkTin5W6w+RLHjvM=o8Rz2+8u4YJWWOw@mail.gmail.com>
On Fri, 20 May 2011, Alex Shinn wrote:
On Thu, May 19, 2011 at 10:10 AM, Andy Wingo <wingo@x> wrote:
I do not agree with the note that permitting any number of values to be
returned from `set!' et al is incompatible. It is not incompatible with
implementations, as it widens the scope of what they may do. It is not
incompatible with existing programs, as I do not expect existing
implementations to switch -- most will do what they have been doing.
Yes, it is incompatible with existing programs. One common example is:
(let* ((start (current-time))
(report-time 'expr start (current-time))
This will work fine for arbitrary expressions, including
*set! and I/O operations, so long as they return a single
value as they do in R5RS.
Arbitrary expressions do not return a single value in R5RS, so
I would say the above macro is buggy even in R5RS. It fails
for something as simple as
(time (values 1 2))
So your example is IMO invalid, unless what you really want is to
return to R4RS. I wonder sometimes... ;)
Scheme-reports mailing list