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

What I want in R^5RS



    Date: Tue, 3 Dec 1991 18:07 EST
    From: Ken Dickey <kend@data.rain.com>

    > Should DELETE-FILE return an indication of success or failure?

    I don't care.  Perhaps more important is the question of whether or
    not `an error is signalled' if the specified file does not exist.  I
    would not be offended by:
      (DELETE-FILE <name> . <bool>)
    where the optional boolean argument indicates whether or not one wants
    an error signalled if the specified file does not exist. ...

Zetalisp used to do something like this seven or eight years ago--before
it had a modern condition system.  Now that I've worked for a long time
in a system with a well-articulated condition system, the notion of
hairing up the dataflow into a function just to control its behavior in
exceptional situations seems ludicrous to me.  Even the vestigial
error-p arguments in numerous Common Lisp functions seem silly to me
now, but can at least be justified on the grounds of backward
compatibility since they used to be necessary before the idea of a
condition system was well-understood.

Someone should make a serious stab at a Scheme condition system.  All
this dancing around not defining useful functionality for fear that some
implementation somewhere will not support the necessary details is
silly.  One purpose of a condition system is to allow people to brazenly
push ahead as if complete functionality existed, and for programs to
reliably stop dead in their tracks if such an assumption proves faulty.
Having to pass funny arguments or look for funny return values is
something there is no longer any reasonable excuse for.

After as many times as I've heard Scheme people nit-pick Common
Lisp--sometimes justifiably, sometimes not--it is a pleasure to take
this opportunity to point out that Common Lisp has a lot to teach Scheme
on these points.  CL has been making tremendous strides not only in the
area of its condition system, but also in its ability to deal
generically with filenames across a variety of platforms, and to deal
with operations on files named by those filenames even though the set of
available file system operations tends to vary.  When the ANSI CL spec
goes into public review (hopefully this spring), the Scheme community
would do well to study the way CL addresses some of these issues.