home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.scheme
- Path: sparky!uunet!spool.mu.edu!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: <1993Jan23.173800.11999@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: <OZ.93Jan22114638@ursa.sis.yorku.ca> <1jpf3e$2m1@agate.berkeley.edu> <OZ.93Jan22174029@ursa.sis.yorku.ca> <1jqqjc$b4p@agate.berkeley.edu>
- Date: Sat, 23 Jan 1993 17:38:00 GMT
- Lines: 41
-
- In article <1jqqjc$b4p@agate.berkeley.edu>, bh@anarres.CS.Berkeley.EDU
- (Brian Harvey) writes:
- |> oz@ursa.sis.yorku.ca (Ozan Yigit) writes:
- |> >But if you want trivial interactions such as these to work as you would
- |> >like them to, you may just as well do something like what David Kelsden
- |> >sent me the other day:
- |> >
- |> > (define void (string->symbol ""))
- |> >
- |> > (define (praise thing)
- |> > (display thing)
- |> > (display " is great!")
- |> > void)
- |> >
- |> >Is this not easier than changing the whole language definition? ;-)
- |>
- |> *You* can write programs like that, and *I* can write programs like
- |> that, but *my students* are going to fall into any pitfalls that the
- |> language leaves in their path.
-
- Oh! I had a better opinion about Berkeley students... If you tell them that
- the Scheme system responds by printing the result of an expression *every*
- time and if you show them your little ``praise'' example to see the
- problem they should get it immediately. Your ``pitfall'' is really not
- such a big deal to justify changes to the language!
-
- |>
- |> I'm not suggesting that an entirely pitfall-free language is possible
- |> or desirable, but this particular pitfall (stupid return values from
- |> commands called for effect) seems to be easily avoidable and to have
- |> no redeeming features.
-
- The ``redeeming'' feature has a name: orthogonality. One of the major
- advantages (in terms of simplicity) of Scheme was that everything has a
- value. To invent ``unspecified values'' is just the same as re-inventing
- the distinction between commands and expressions. Once we have this doesn't it
- appear to be a nasty pitfall if we are still allowed to write ``commands'' in
- ``expression'' contexts. No, we are not moving toward ML -- we will
- probably end up with Pascal!
-
- -Matthias
-