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

Re: BINDing unbounds

    There is actually a good (if not overwhelming) reason for leaving
    a variable uninitialized if its global value is never accessed.
    It helps catch places where a function is called by someone who
    failed to bind a dynamic variable that was needed.  I had more
    or less unconsciously made sure that every variable that didn't
    have a meaningful global value didn't have any global value, and
    this has come back to haunt me.
I think this is an argument for something that I was discussing with
Jonathan the other day:  namely, the splitting up of the functionality
of LSET.  LSET now does 2 things: (1) introduces a variable into a
locale and (2) sets the initial value of that variable.  It has always
disturbed me that you can use both SET and LSET to set the value of
a global variable.  It seems like what you really want is a primitive
LCREATE that takes only a variable name as its argument.  It simply
introduces the variable into the locale, but gives it no value.  Then
LSET becomes a macro:

        `(BLOCK (LCREATE ,VAR)
                (SET ,VAR ,OBJ)))

                        -- Nat