Path: utzoo!attcan!uunet!yale!krulwich-bruce From: krulwich-bruce@CS.YALE.EDU (Bruce Krulwich) Newsgroups: comp.lang.lisp Subject: Re: What's the value of lexical scoping? Message-ID: <31720@yale-celray.yale.UUCP> Date: 17 Jun 88 17:12:02 GMT References: <24508@ucbvax.BERKELEY.EDU> <515@dcl-csvax.comp.lancs.ac.uk> <199@esosun.UUCP> <525@dcl-csvax.comp.lancs.ac.uk> Sender: root@yale.UUCP Reply-To: krulwich-bruce@CS.YALE.EDU (Bruce Krulwich) Organization: Yale University Computer Science Dept, New Haven CT 06520-2158 Lines: 32 In article <525@dcl-csvax.comp.lancs.ac.uk> simon@comp.lancs.ac.uk (Simon Brooke) writes: >If you wish to gain information from your environment, then clearly, the >names of the symbols you use do matter. If you bind your locals either >in an arg list or in a let statement, then they don't matter. If you >*don't* do this, then you are using globals, which will get you into equal >trouble no matter what binding scheme you use. This is simply not true, especially when using programming techniques encouraged in lexically scoped LISPs. Suppose you pass around a function. In a lexically scoped LISP such a function can reference variables from the function that created it. In a dynamically scoped LISP this variable references can be blocked by other variables in the system. This is something you may not have done, having not worked with lexically scoped LISPs, but it is incredibly powerful. (See, for example, the book AI PROGRAMMING, by Charniak et al.) >>HAVE YOU EVER USED LISP????? >Yes. Why do you think I care about it so much? There is a big difference between the capabilities available (and thus the techniques used) in modern LISPs as opposed to older LISPs. I really suggest looking at AI PROGRAMMING or a similar book before claiming that such capabilities are not needed. Bruce Krulwich Net-mail: krulwich@{yale.arpa, cs.yale.edu, yalecs.bitnet, yale.UUCP} Goal in life: to sit on a quiet beach solving math problems for a quarter and soaking in the rays.