[r6rs-discuss] "Unspecified"

Anton van Straaten anton at appsolutions.com
Fri Sep 22 14:41:29 EDT 2006


Andre van Tonder wrote:
> On Thu, 21 Sep 2006, Anton van Straaten wrote:
> 
>> One job of the R6RS is to assign meaning to such phrases.  In this 
>> example, it does this by specifying that when a program omits the 
>> <alternate> term, then the phrase in question returns a value which 
>> denotes that no value was specified by the program at that point.
> 
> 
> But a value /is/ specified by the program at that point according to r6rs
> (namely the value #<unspecified>).

As an aside, afaik, "#<unspecified>" is not used by the R6RS draft.  The 
draft says in 9.8 that "the unspecified value ... has no external 
representation".

Of course you're right that by omitting the <alternate> clause, a value 
is implicitly specified, per the draft.  For a more precise description 
of what I am trying to communicate, you could replace my "no value was 
specified" with "no external representation of a value was specified".

> If I write my program so that it intentionally returns #<unspecified> if 
> 5 is odd, and #t if 5 is not odd, does this mean that the output of my 
> program does not specify that 5 is odd?

The unspecified value involves no implication about the interpretation 
of the answers produced by the programs which use it.  All that you can 
conclude from receiving the unspecified value is that the program which 
produced it used one of the operations which can produce the unspecified 
value, in a way that did in fact produce the unspecified value.

> In fact, the whole point of "unspecified" in r5rs was that I could *not* 
> use the program
> 
>      (if (even? 5)
>          #t))
> 
> to determine whether 5 was odd, since the value of this expression, 
> being unspecified, could in fact have been #t.  In r6rs I can tell 
> whether it is odd from the output, which seems to contradict your 
> assertion that "no value was specified by the program".

It doesn't contradict my clarified assertion that no external 
representation of a value was specified by the program.

> I'm smelling a liar's paradox.  If one wants to avoid being circular, 
> one could say that:
> 
> "the *r6rs* expression in question returns a (specified) value which 
> denotes that no return value was specified in *r5rs* for the expression."
> 
> So maybe #<unspecified-by-r5rs> would be a more accurate name for it ;-)

I don't see a liar's paradox in my clarified assertion.  Nor is there 
any appeal to the semantics of R5RS.

> This would be a weird way to write a language specification, so I would 
> just call it something else instead.

Since I've now demonstrated that this weird way to write the language 
specification isn't needed, does that mean you no longer have an 
objection to the phrase "the unspecified value"?

Seriously, though, as I've already mentioned, I'm not arguing against 
finding a way to reduce the potential for the sort of confusion we've 
been discussing.

Anton



More information about the r6rs-discuss mailing list