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

Re: "unspecified" and SET!

In article <2281@ubc-cs.UUCP> manis@grads.cs.ubc.ca (Vincent Manis) writes:
  << Stuff omitted. >>
>I regard `returns an unspecified result' as an injunction not to place
>a call to a procedure in a value-returning position, e.g., the last
>step in a lambda or begin. If I wrote a Scheme compiler, fascist that
>I am, I would probably generate an error message for such a usage.
  << Stuff omitted. >>

This is really not a criticsm, only a question. How does one go about
building a compiler that can detect when a procedure is going to 
return an unspecified result, especially those which sometime return
unspecified values and sometimes return specified values? For example,
in an object-oriented program most objects will respond to some
messages with actual information and to some messages with unspecified
values. On the face of it, it sounds very difficult to determine such
things syntactically. And wouldn't runtime checking amount to 
introducing the unspecified object?

It doesn't seem right to me that a user should have to know the 
full specifications of an object before being able to confidently
send messages to that object.  It would seem preferable to me to
be able to check whether the result returned has any information

Also in this discussion I haven't heard any mention of my suggestion
to see the unspecified object as being analogous to NaN in the IEEE
numeric standard. Is that a bad analogy? Is NaN a bad idea? Just

-- Brad