home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!gumby!destroyer!cs.ubc.ca!columbia.cs.ubc.ca!not-for-mail
- From: manis@cs.ubc.ca (Vincent Manis)
- Newsgroups: comp.lang.scheme
- Subject: Re: Unspecified values in R4RS
- Date: 24 Jan 1993 09:51:52 -0800
- Organization: The Invisible City of Kitezh
- Lines: 22
- Message-ID: <1jukvoINNgis@columbia.cs.ubc.ca>
- References: <1993Jan21.195822.23639@sqwest.wimsey.bc.ca> <1jn7ou$m5n@agate.berkeley.edu>
- NNTP-Posting-Host: columbia.cs.ubc.ca
-
- In article <1jn7ou$m5n@agate.berkeley.edu> bh@anarres.CS.Berkeley.EDU
- (Brian Harvey) writes:
- >About unspecified values, in my *strong* opinion these should all be
- >expunged from the standard and replaced with a nonprinting value...
- Yes!!! This has a number of pedagogical advantages, not least of which
- is that it makes clear the difference between an expression (evaluated
- primarily for value) and a command (evaluated only for effect). For
- proficient programmers, this isn't a big deal, but for beginners it's
- essential.
-
- I like the Chez Scheme approach. There's a void type, with only a single
- value. The procedure (void) yields this value, and (void? x) is a
- type-checking predicate. This is a simple, clean, approach, and is quite
- compatible with existing Schemes. (If your Scheme doesn't have an
- #unspecified, you can always use a gensym.) Apart from this, the only
- other change which has to be made is to have the top level print nothing
- when the result is void.
- --
- \ Vincent Manis <manis@cs.ubc.ca> "There is no law that vulgarity and
- \ Computer Science, Langara College literary excellence cannot coexist."
- /\ 100 W. 49th Ave, Vancouver, BC, Canada (604) 324-5205 -- A. Trevor Hodge
- / \ Co-author of ``The Schematics of Computation'', Prentice-Hall, Jan 1994
-