[cells-devel] Re: [cello-devel] Constructor syntax

Kenny Tilton ktilton at nyc.rr.com
Sun May 9 06:02:16 UTC 2004



Thomas F. Burdick wrote:

>Kenny Tilton <ktilton at nyc.rr.com> writes:
>
>  
>
>>nikodemus at 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 , at forms)
>                              , at 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+) , at 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






More information about the cells-devel mailing list