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

Re: A few random I/O proposals

   Since Scheme has no error/condition system yet, and since having
   OPEN return #f for failure is an imperfect solution for reasons
   that have been well covered, how about having OPEN accept a failure
   continuation argument?

Interestingly enough, Lisp 1.5 used failure continuations in
some cases.  E.g.:

   sassoc[x;y;u]    :   SUBR    functional

      The Function sassoc searches y, which is a list of dotted
   pairs, for a pair whose first element that is x [sic].  If
   such a pair is found, the value of sassoc is this pair.
   Otherwise, the function u of no arguments is taken as the
   value of sassoc.

      sassoc[x;y;u] = [null[y] -> u[];
                       eq[caar[y];x] -> car[y];
                       T -> sassoc[x;cdr[y];u]]

The function u is called.  This is clearer in the description of

-- jd