home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!usc!rpi!uwm.edu!linac!att!att!dptg!ulysses!allegra!princeton!csservices!kastle!blume
- From: blume@kastle.Princeton.EDU (Matthias Blume)
- Subject: Re: Unspecified values in R4RS
- Message-ID: <1993Jan22.185518.1064@csservices.Princeton.EDU>
- Sender: news@csservices.Princeton.EDU (USENET News System)
- Reply-To: blume@kastle.Princeton.EDU (Matthias Blume)
- Organization: Dept. of Computer Science, Princeton University
- References: <1993Jan21.195822.23639@sqwest.wimsey.bc.ca> <1jn7ou$m5n@agate.berkeley.edu>
- Date: Fri, 22 Jan 1993 18:55:18 GMT
- Lines: 24
-
- 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, and
- |> the procedures that now have unspecified return values should all be
- |> required to return that. It doesn't really matter for experienced Scheme
- |> programmers, but it's really confusing to a learner who invokes DISPLAY
- |> and sees *two* values printed.
-
- I understand the intension behind ``unspecified'' in R4RS as a way to provide
- some freedom to the implementor of Scheme. A construct that returns an
- unspecified value allows to ``leave hands off'' the ``value register'' and
- to return whatever is there. (For an ``if'' without ``else'' I can
- imagine an implementation :-) that just returns the value of the conditional
- (i.e. #f) whenever the condition is not satisfied. Likewise for ``set!'' etc.)
- A mandatory ``unspecified'' value would force us to use a couple of more
- instructions to load this value all over the place.
-
- If you want more strict rules, then I would suggest to specify argument
- evaluation order as well. And maybe strong types would be nice, too. Why
- don't we all switch to ML?
-
- -Matthias
-