-----Original Message----- From: Gary King [mailto:gwking@metabang.com] Sent: Tuesday, 08 March, 2005 13:44 To: Edi Weitz Cc: ML CL-PPCRE; Kick Damien-DKICK1 Subject: Re: TR: [cl-ppcre-devel] New release 1.2.4
I suggest taking a page from GBBopen's book and using something like:
(defmacro with-standard-optimization (&body body) `(locally (declare (optimize (speed 1) (safety 3) (debug 1))) ,@body))
(defun foo () (with-standard-optimization ...))
this has the advantage of not requiring the read time evaluation of #. which some view as a security risk.
Hmmm... if one can write a macro that expands to a LOCALLY form in the same place and for the same reason as would might've done with DECLARE, then what is the point of having disallowed one from writing a macro that expands into a DECLARE http://tinyurl.com/6v4v3 http://tinyurl.com/6v4v3? <shrug> I suppose it doesn't matter; it does seem better to be able to write a macro that conditionally expands into different values of optimization settings than use read time evaluation. I'll try riffing off of this GBBopen approach.
-- Damien Kick
Yeah... I agree. I've never understood that either...
On Mar 8, 2005, at 3:10 PM, Kick Damien-DKICK1 wrote:
Hmmm... if one can write a macro that expands to a LOCALLY form in the same place and for the same reason as would might've done with DECLARE, then what is the point of having disallowed one from writing a macro that expands into a DECLARE http://tinyurl.com/6v4v3?%C2%A0%C2%A0 <shrug> I suppose it doesn't matter; it does seem better to be able to write a macro that conditionally expands into different values of optimization settings than use read time evaluation. I'll try riffing off of this GBBopen approach.
cl-ppcre-devel@common-lisp.net