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

[no subject]

    Date: 18 MAR 1980 1242-EST
    From: GLS at MIT-AI (Guy L. Steele, Jr.)

    Just as it is useful for (CAR ()) = (CDR ()) = (), so it would
    be very useful for any DEFSTRUCT selector to return () when
    applied to ().  I'm writing a piece of code for which that would
    be INFINITELY convenient.  On the other hand, I'm not sure I
    would want the AR-n primitives as such to change (but maybe so?).
    Anyway, (SETF (FOOBAR ()) 43) would still barf, just as
    (RPLACA () 43) should.  Anyway, it would seem simple to add
    something like CAR-SYM-MODE called AR-SYM-MODE or something,
    with only two values (error, and error-except-nil).

This might be a good idea, but having modes to control it is no good,
because these operations will be run in the same world with other code
which does not expect such behavior.  So there would need to be new
operations which would be like AR-N except allow nil.  Then the user
could in each DEFSTRUCT specify whether nil would be allowed or not.