Thomas F. Burdick wrote:
Kenny Tilton ktilton@nyc.rr.com writes:
nikodemus@random-state.net wrote:
This is quite off-topic for the thread, but I for one always cringe when I see Cells code due to C? and friends.
If the syntax were:
RULE-LAMBDA (binding) form*
or
RULE-LAMBDA binding form*
Garnet's KR had (I forget)-formula. But when one is /really/ using Cells, one is spraying CVs and C?s around all the time, and this is more a candidate for something like collapsing QUOTE into ' or FUNCTION into #' then it is expansion into big-huge-name useful at the application level where, as we all know, excessive abbreviation saves so very little and detracts so much from readability.
That said, if some contributor wanted to create c-formula and c-variable macros and add them to Cells I would not mind.
Okay, how are these for a start?
(defmacro cv (&optional (value +unbound+)) `(cells::make-c-variable :value ,value))
(defmacro c-formula ((&rest keys &key lazy cyclic-p cyclic-value) &body forms) (declare (ignore lazy cyclic-p cyclic-value)) `(cells::make-c-dependent :code ',forms :rule (c-lambda ,@forms) ,@keys))
(defmacro c-variable ((&rest keys &key cyclic-p) &optional (value nil valuep)) (declare (ignore cyclic-p)) `(cells::make-c-variable :value ,(if valuep value '+unbound+) ,@keys))
looks ok. but...
1. Is there a definition for +unbound+ missing?
2. Maybe if I stare at it long enough it will come to me, but why not do on c-variable what is proposed for cv, viz.,:
&optional (value '+unbound+)
kt