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

Re: [Scheme-reports] Technical question



On 05/27/2011 12:35 AM, Jay Reynolds Freeman wrote:
> Perhaps the formal semantics have not correctly captured the
> language?  The text description, "Except for continuations created
> by the call-with-values procedure, all continuations take exactly one
> value," does not seem to offer any leeway for the interpretation that
> Andre suggests.  (The R7 draft and R5 are identical here.)

That restriction is captured in the R5RS semantics by the use of the 
'single' auxiliary function, which wraps the continuations that require 
it and ensures that those continuations will only accept a single value.

In our example, this doesn't apply, and the reason for that was pointed 
out by Andy Wingo: the call/cc application is in tail position, so its 
continuation is the multi-valued continuation created by call-with-values.

(Andy's response is actually much more on-point than mine; I raised the 
semantics in the idealistic hope that it might be helpful for a question 
like this, and because I'm a huge fan of the idea of being able to 
execute something and get a definitive answer.)

> Lest I be accused of excessive pedantry

Having resorted to formal semantics to try to decide an issue, I don't 
think I'm in any position to accuse others of excessive pedantry!

> I point out that the description
> of what the formal semantics is, in the the introduction to chapter 7
> (and again R7 and R5 are identical in  wording) suggests that
> the purpose of the formal semantics is to capture the informal
> description rather than to serve in its own right as a definition
> of Scheme.

That makes Leibniz sad.  I take your point, although in this case, I 
don't see any conflict between the informal and formal descriptions.

> If the question of what to do with multiple values has
> only just come up, there is no particular reason to think that whoever
> wrote the formal semantics got it right.

I suspect them'd be fightin' words to the authors of the semantics. 
Before going there, we'd need to find an example of an error, other than 
the known ones like the dynamic-wind issue raised in the errata.

Anton

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