Re: [Scheme-reports] "unspecified values" Jim Rees (19 May 2011 18:51 UTC)
Re: [Scheme-reports] "unspecified values" Emmanuel Medernach (19 May 2011 19:50 UTC)
Re: [Scheme-reports] "unspecified values" Per Bothner (20 May 2011 07:42 UTC)
Re: [Scheme-reports] "unspecified values" John Cowan (20 May 2011 14:32 UTC)
Re: [Scheme-reports] "unspecified values" Andy Wingo (20 May 2011 15:19 UTC)
Re: [Scheme-reports] "unspecified values" John Cowan (20 May 2011 15:48 UTC)
Re: [Scheme-reports] "unspecified values" Andy Wingo (20 May 2011 16:02 UTC)
Re: [Scheme-reports] "unspecified values" Per Bothner (20 May 2011 16:02 UTC)
Re: [Scheme-reports] "unspecified values" Aaron W. Hsu (20 May 2011 16:35 UTC)
Re: [Scheme-reports] "unspecified values" Alex Shinn (20 May 2011 16:56 UTC)
Re: [Scheme-reports] "unspecified values" Jim Rees (20 May 2011 17:02 UTC)
Re: [Scheme-reports] "unspecified values" Andre van Tonder (20 May 2011 17:20 UTC)
Re: [Scheme-reports] "unspecified values" John Cowan (20 May 2011 20:03 UTC)
Re: [Scheme-reports] "unspecified values" Alaric Snell-Pym (23 May 2011 10:49 UTC)
Re: [Scheme-reports] "unspecified values" John Cowan (23 May 2011 15:50 UTC)
Re: [Scheme-reports] "unspecified values" Aaron W. Hsu (23 May 2011 22:50 UTC)
Re: [Scheme-reports] "unspecified values" Alaric Snell-Pym (23 May 2011 10:05 UTC)
Re: [Scheme-reports] "unspecified values" Andy Wingo (19 May 2011 21:42 UTC)

Re: [Scheme-reports] "unspecified values" Per Bothner 20 May 2011 16:02 UTC

On 05/20/2011 08:46 AM, John Cowan wrote:
> Andy Wingo scripsit:
>
>> I think that Per is saying that if `set!' returns no values, then
>> there is nothing for P to ignore.
>
> Sure.  But "making the REPL nicer" is not an argument in favor of set!
> returning no values, as the REPL can be just as nice when set! returns a
> (distinguished) value.

But there is an elegance to doing it this way: If the REPL prints out all
the values of multiple values, then doing nothing when there are no values
doesn't even require special casing.  (Some fudging is involved in terms
of when to emit newlines or whitespace.)

Having set! etc return no values also interacts nicely with a set of
alternative syntactic forms where <body> is effectively append-values.
This makes for a very pleasant and composable API, though I won't into
that here.  (Imagine the composability of XQuery sequences with the
tool-friendliness of shell with the power of Scheme.)
--
	--Per Bothner
per@bothner.com   http://per.bothner.com/

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