From ... Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!newsfeed1.bredband.com!bredband!uio.no!nntp.uio.no!ifi.uio.no!not-for-mail From: Erik Naggum Newsgroups: comp.lang.lisp Subject: Re: Idiot's guide to special variables take 2 Date: 18 Nov 2002 00:59:33 +0000 Organization: Naggum Software, Oslo, Norway Lines: 52 Message-ID: <3246569973032676@naggum.no> References: <873cqarw00.fsf@darkstar.cartan> <87smy9ykxx.fsf@darkstar.cartan> <87d6pd5kur.fsf@darkstar.cartan> <3246412315069073@naggum.no> <87znsaauvd.fsf@darkstar.cartan> <3246463395155052@naggum.no> Mime-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Transfer-Encoding: 8bit X-Trace: maud.ifi.uio.no 1037581174 14118 129.240.65.5 (18 Nov 2002 00:59:34 GMT) X-Complaints-To: abuse@ifi.uio.no NNTP-Posting-Date: 18 Nov 2002 00:59:34 GMT Mail-Copies-To: never User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 Xref: archiver1.google.com comp.lang.lisp:47026 * Aleksandr Skobelev | What the equivalence do they speak about? Sigh. It means that when somebody says the "null lexical environment", the expressin contains relevant information about (at least) two things: (1) the perspective and (2) the object. The same holds for "the global environment", of course, in which case the object is the same as for the previous expression, but the /perspective/ is not. | Do they mean that, like the global environment, the null lexical | environment contains no lexical bindings? The global environment is what you get when you have no lexical bindings. The point here is that the lexical environment shadows the global. When you have an empty/null lexical environment, you have nothing that could shadow the global environment, therefore the consequence of viewing your environment through the now empty/transparent lexical environment is that you see only the background global environment. But it is possible to look at the global environment /without/ looking through a transparent lexical environment that shadows nothing, hence the two perspectives have different names. Think of bindings as squares on a blackboard. You can flip overlays over the blackboard from both sides, and the overlays can have opaque squares that shadow any other bindings but otherwise be transparent. Now, the overlays attached to one side holds overlays for special bindings while the other side holds lexical overlays, so you can flip them in from both sides. A `specialĀ“ proclamation means that you cut a whole in all the lexical overlays so that you will always see the dynamic bindings. When you make a special binding, you make an opaque square on an overlay you have flipped in from the special side and scribble on it. When you make a lexical binding, you make an opaque square on an overlay you have flipped in from the lexical side and scribble on it. When you call a function, you temporarily remove all your lexical overlays, but the special overlays remain, and you use a fresh set of lexical overlays. Now, if you make no lexical bindings on this fresh set of overlays, you have the null lexical environment. This is what `evalĀ“ starts out with, just like any other function before it makes its own lexical bindings, such as for incoming arguments (which may also cause special bindings, btw). Did that make the issue opaque or transparent? And, please, there is no global lexical environment. While some evidently think it is descriptive of something, it is an oxymoron that only confuses people who do not understand what is going on. -- Erik Naggum, Oslo, Norway Act from reason, and failure makes you rethink and study harder. Act from faith, and failure makes you blame someone and push harder.