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

Re: unspecified-object



In article <24169@shemp.CS.UCLA.EDU> pierce@lanai.cs.ucla.edu writes:

]    I think that the specification of Scheme, as well as many Scheme programs,
]    would be made more elegant if an "unspecified-object" analogous to NaN in 
]    the IEEE numeric standard were introduced. Functions which return 
]    unspecified values now would be required to return an "unspecified-object"
]    instead.
] 
]    -- Brad

I agree quite strongly with this. The scheme that I've been hacking at
lately is Ed Puckett's AmiScheme for the Amiga. In Amischeme, there is
an object called #u, the sole member of the "unit" domain. Any
internal function that the standard says returns an "unspecified"
result returns #u. In my functions, I try to do this also - any
function that exists for its side-effects returns #u. In addition to
adding clarity, it has proven quite useful for debugging.

	<MC>
-- 
=|                     Mark Craig Carroll: <MC>                       |=
=|       mccarrol@topaz.rutgers.edu,...!rutgers!topaz!mccarrol        |=
=|  "Your only obligation in any lifetime is to be true to yourself"  |=
=|                     -Richard Bach,_Illusions_                      |=