Subject: Re: The Lisp-Difference
From: (Rob Warnock)
Date: Mon, 20 Sep 2004 20:39:31 -0500
Newsgroups: comp.lang.lisp
Message-ID: <>
Pascal Costanza  <> wrote:
| >   (declare transactional)
| > Never heard of this. Can someone explain?
| There is a discussion about a DEFINE-DECLARATION macro in CLtL2
| (Section 8.5). This was dropped for ANSI Common Lisp.

Actually, there *is* a trace of it left in ANSI CL. See the

	(declaration name*) 
	Advises the compiler that each name is a valid but
	potentially non-standard declaration name. The purpose
	of this is to tell one compiler not to issue warnings
	for declarations meant for another compiler or other
	program processor. 

So if one were to say:

	(declaim (declaration transactional))

then it becomes legal to later write things such as this:

	(defun foo (x)
	  (declare transactional)

or even something like this [for SQL fans]:

	(defun foo (x)
	  (declare (transactional "ISOLATION LEVEL SERIALIZABLE")

so that, as someone else noted, you could have a compiler macro
for FOO that reached in, parsed the declaration, and rewrote the
function, perhaps into this:

	(defun foo (x)
	  (with-transaction (:isolation-level :serializable)


Rob Warnock			<>
627 26th Avenue			<URL:>
San Mateo, CA 94403		(650)572-2607