[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Naive T Design Questions Addendum
1. Oops! #T should read #F.
6. Sorry, the form given in the last message:
(define (read-keyword port ch rt)
(let ((keyword (read-atom port rt ch)))
(*lset (the-environment) keyword keyword)))
is brain dead. The second keyword in the *lset needs to be
(list quote keyword), but this doesn't work either since
(the-environment) is evaluated at the wrong time! I don't know how to
get the correct environment for this, the one into which the keyword is
being read. Quoting doesn't work because it is not known at read time if
the keyword will be evaluated later:
':key
'(some list with :key embedded)
`(some list with ,(read-port-with-different-read-table) embedded and
file contains :key)
etc.
7. Why not separate the concept of () and no entry in tables? This would be
easy to implement since () valued keys could be left in place. Then keys
not present would denote empty key values. The function TABLE-ENTRY
should still probably return () for both. Two new function would be
needed: TABLE-ENTRY? for existence, and REMOVE-TABLE-ENTRY for removing a
key from the table. Note that having both #F and () doen't get one out
of this mess, because one could imagine storing a false for the value of
one key and an empty list for the value of another. The user could map
both back into say () but that would really violate the notion of there
separation (not to mention what this may later break)!
Thanks in advance,
JJHunt
P.S. The IF THEN ELSE macro would be more efficient if (= 1 (length rest)),
is replaced by (not (cdr rest)).