Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ames!elroy!ucla-cs!pierce From: pierce@lanai.cs.ucla.edu (Brad Pierce) Newsgroups: comp.lang.scheme Subject: Re: "unspecified" and SET! Keywords: unspecified object sigma Message-ID: <25058@shemp.CS.UCLA.EDU> Date: 20 Jun 89 16:29:44 GMT References: <3902@kalliope.rice.edu> <19890619192610.2.ALAN@PIGPEN.AI.MIT.EDU> <2281@ubc-cs.UUCP> Sender: news@CS.UCLA.EDU Reply-To: pierce@cs.ucla.edu (Brad Pierce) Distribution: na Organization: UCLA Computer Science Department Lines: 30 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 content. 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 wondering. -- Brad