I'll do a version based on read time evaluation first because it looks like the easiest thing to do. I'm going to want to experiment with the macro expanding to a LOCALLY expression anyway, for my own edification, so maybe I'll put together two different versions...
-- Damien Kick
-----Original Message----- From: Edi Weitz [mailto:edi@agharta.de] Sent: Tuesday, 08 March, 2005 14:49 To: gwking@metabang.com Cc: ML CL-PPCRE; Kick Damien-DKICK1 Subject: Re: TR: [cl-ppcre-devel] New release 1.2.4
On Tue, 8 Mar 2005 14:43:36 -0500, Gary King gwking@metabang.com wrote:
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.
I have to admit that I find the #. approach more aesthetically pleasing - one reason is that it doesn't introduce a new level of nesting.
I fail to see the security risk - we're not talking about data entered from a random website or somesuch.
Cheers, Edi.