Subject: Re: global lexicals
From: rpw3@rpw3.org (Rob Warnock)
Date: Thu, 01 May 2003 21:59:29 -0500
Newsgroups: comp.lang.lisp
Message-ID: <hYOcned8dZmMQiyjXTWc-g@speakeasy.net>
Tim Bradshaw  <tfb@cley.com> wrote:
+---------------
| * Nils Goesche wrote:
| > Why do you use a hash table?
| 
| I don't want a secret special variable per global lexical, I guess.
| No real reason though.  I wasn't worried about performance (it's in
| the `some small hacks of no real use' section!).
+---------------

When I did my own version of "deflex" (not shown here: ugly, buggy),
like Tim I didn't want a "secret special variable per global lexical"
either, but instead of a hash table I used an adjustable array so that
each resulting symbol macro expands into:

	(aref *global-lexical-vars* <some-literal-constant-fixnum>)

which should be performant enough, yes?


-Rob

-----
Rob Warnock, PP-ASEL-IA		<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607