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

Re: Flat property lists

I think I finally figured out what's going on.  Indeed every Lisp dialect I
can find a manual for in my office describes property lists as flat lists
of alternating indicators and values.  The dialects which do have flags
(Lisp 1.5 and Lisp/360) appear to just throw them in as atoms in the flat
list.  This obviously leads to severe problems in synchronizing the search
down the list!  Perhaps this is the origin of Moon's (unsupported) claim
that flags are a crock.  Flags are not a crock, but the way they were
implemented certainly was!  This must have led to their elimination in more
recent dialects, such as Stanford Lisp 1.6, Maclisp and Interlisp.
Standard Lisp included flags, but recent implementations have used a more
reasonable implementation for them, by making the p-list resemble an a-list
except for the atomic flags.  Even without flags, an a-list seems like a
more obvious implementation to me, since it reflects the structure of the
data.  There is NO cost difference in space or speed (excluding cdr-coding)
between a flat list and an a-list if flags are not included.  The presence
of flags on the list requires a CONSP test for each indicator comparison
which would otherwise be unnecessary.

Much of the above is speculation.  Lisp historians please step forward and
correct me.