Article View: comp.lang.logo
Article #199Re: Dynamic scope (was Re: Future of Logo)
From: Brian Harvey
Date: Tue, 25 Aug 1992 17:26
Date: Tue, 25 Aug 1992 17:26
26 lines
1939 bytes
1939 bytes
dorai@cs.rice.edu (Dorai Sitaram) writes: >I don't understand the big pain in the neck part. Is it the notion of >lexical scope in itself, or is it the way to get it in Object Logo >that is a big pain? Lexical scope itself. Or perhaps I should say, the incompatibility of lexical scope with other aspects of Logo. I think lexical scope is fine in Scheme, for example, where it combines with first-class functions and a heavy use of macros so that you can do anything you want to do. In Logo, without first-class functions, it's common to use "first-class expressions" to achieve the same goal. That is, if you want to write a higher-order function like MAP, what you pass as an argument is a list containing an expression, which then gets RUN repeatedly by MAP. That expression must have access to the local variables of whatever procedure called MAP. Object Logo does provide ways to get dynamic scope by asking for it explicitly, but that means that the Object Logo user has to have a pretty sophisticated understanding of scope rules to know when to ask. (And to be fair, part of my annoyance is that until quite recently the feature about asking for dynamic scope didn't really work!) I could go on for a while but we had a discussion of this in the newsgroup not long ago so maybe we should continue by mail if you want to pursue it.
Technical Details
Message-ID:
<17dqfhINNqfo@agate.berkeley.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!anarres.CS.Berkeley.EDU!bhReferences:
<BtGxA6.FvK@rice.edu> <17ardcINNebn@agate.berkeley.edu> <BtJo1H.DGD@rice.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!haven.umd.edu!darwin.sura.net!zaphod.mps.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!anarres.CS.Berkeley.EDU!bh From: bh@anarres.CS.Berkeley.EDU (Brian Harvey) Newsgroups: comp.lang.logo Subject: Re: Dynamic scope (was Re: Future of Logo) Date: 25 Aug 1992 17:26:09 GMT Organization: University of California at Berkeley Lines: 26 Message-ID: <17dqfhINNqfo@agate.berkeley.edu> References: <BtGxA6.FvK@rice.edu> <17ardcINNebn@agate.berkeley.edu> <BtJo1H.DGD@rice.edu> NNTP-Posting-Host: anarres.cs.berkeley.edu