home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!paladin.american.edu!gatech!usenet.ins.cwru.edu!agate!anarres.CS.Berkeley.EDU!bh
- From: bh@anarres.CS.Berkeley.EDU (Brian Harvey)
- Newsgroups: comp.lang.scheme
- Subject: Re: Spread of Scheme and SICP?
- Date: 22 Dec 1992 20:16:46 GMT
- Organization: University of California, Berkeley
- Lines: 50
- Message-ID: <1h7t3eINNgd@agate.berkeley.edu>
- References: <921222144636_71020.1774_EHC61-1@CompuServe.COM>
- NNTP-Posting-Host: anarres.cs.berkeley.edu
-
- 71020.1774@compuserve.COM (Terry Kaufman) writes:
- >It would be a mistake to discourage high school teachers from using
- >Scheme. Besides as it continues to grow in popularity at the university
- >level, Scheme has a much better chance than Logo to displace BASIC and
- >Pascal in high schools.
-
- I have mixed feelings about this. As far as the core of the two languages is
- concerned, I agree that Scheme has both easier-to-understand [although maybe
- *initially* more intimidating] syntax and greater expressive power [i.e.,
- lambda]. But two things work in Logo's favor, and I think at least one of
- them should be addressed in R(N+1)RS:
-
- 1. Debugging is easier in Logo, for a beginner, for two reasons: (a) the
- default behavior on an error is *not* to put you in some screwy debugging
- sub-language that you don't understand; and (b) dynamic scope makes it very
- easy to ask for all the relevant variables, without having to know about
- frames, stacks, etc.
-
- This is the one I think could be addressed in the standard. I'd like it to
- be standard behavior that you have to ask for a debugger before you get one.
- Going along with that, the error message you see should be more complete,
- telling you the expression that failed and the name (if any) of the procedure
- in which it occurred. [I know that that's hard to get right in a tail
- recursive interpreter, but I can do it in Berkeley Logo, so it can be done!]
- That would take care of part (a).
-
- For part (b), I'd like to see a standard notation for asking for something
- in a different frame. I'm thinking along the lines of procedure:variable
- to ask for some variable in the closest dynamically enclosing frame for an
- invocation of some procedure. Perhaps you might also be able to say
- variable:3 for some variable three procedure calls ago, although that's
- also hard with tail calling. And I know I'm overloading the colon, but it's
- not the notation I'm trying to design, just the meaning. The point is that
- the debugger should be a plain old Scheme REPL but allowing this extended
- notation for variables in other frames without having to switch explicitly.
-
- [Actually it wouldn't bother me in the least if the debugger just simulated
- dynamic scope by letting you just say the variable name and, if there's no
- such variable in the current environment, looking outward dynamically until
- it finds one. But I know that would be unpopular so I'm compromising.]
-
- 2. Logo's word data type, which encompasses symbols, numbers, strings, and
- characters, is incredibly convenient compared to all the x->y procedures you
- have to hassle with in Scheme. I understand that the Scheme way is more
- efficient but Logo is great for a beginner who wants to find the plural of
- a noun, or something like that. [My colleague Matt Wright and I are about
- to publish an introductory Scheme text, for people who aren't ready for
- SICP yet, in which we use a version of Logo's data types implemented in
- standard Scheme. Since it *can* be done that way, I'm not so insistent on
- making this be Scheme's standard behavior as for point #1.]
-