Re: defsystem & eval

Sam Steingold <[email protected]> Thu, 18 Aug 2005 17:33:09 -0400
Newsgroups gmane.lisp.clocc.devel
Organization disorganization
Message-ID <[email protected]>
> * Marco Antoniotti <[email protected]> [2005-08-18 17:21:08 -0400]:
>
> On Aug 18, 2005, at 5:07 PM, Sam Steingold wrote:
>
>>> * Marco Antoniotti <[email protected]> [2005-08-18 15:45:00 -0400]:
>>>
>>> I see not other way but to revert to the previous version.
>>
>> you can replace (eval foo) with
>> (typecase foo
>>  (function (funcall foo))
>>  (otherwise (eval foo)))
>> this will work for the top-level cases.
>
> Ok.  But what do you gain with this?  You can write
>
> 	:finally-do #'foo
>
> instead of
>
> 	:finally-do (foo)
>
> ?

I am not sure I understand you.


> Is that all?

look at cllib.system:

(let (x)
(defsystem ...
  :initally-do (setq x 1)
  :finally-do (print x))
)

replacing (setq x 1) with (lambda()(setq x 1)) will not eliminate
compilation warnings.

-- 
Sam Steingold (http://www.podval.org/~sds) running w2k
<http://www.honestreporting.com> <http://www.memri.org/>
<http://www.dhimmi.com/> <http://www.savegushkatif.org>
My other CAR is a CDR.



-------------------------------------------------------
SF.Net email is Sponsored by the Better Software Conference & EXPO
September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices
Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA
Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf