Re: lisp & scheme

Date view Thread view Subject view Author view

From: Jeff Bone (jbone@clickfeed.com)
Date: Mon Mar 20 2000 - 09:11:14 PST


>
> It is my understanding that lisp and scheme are fairly closely
> related... Would there be an advantage to learning one over the other,
> given that I probably won't use either very much, but am learning more
> or less for the sake of broadening my horizons a bit? In either case,
> is there a standard book that one recommends when the topic comes up?
>

Learn Scheme. (Actually trying to go learn Common Lisp at this point would
be kind of like deciding you really wanted to learn some old, gnarly
research version of UNIX instead of, say, a nice modern BSD4x or System V
version.) Lisp's scoping rules include an actual *bug* which has since
become such a part of Lisp culture that true Lispers think of it as a
feature. Not to mention, Lisp per-se is more irregular / idiosyncratic /
larger surface area, and most of the good texts these days deal with Scheme
anyway.

Here's a curriculum, if you'd like one. ;-)

First, you'll need a Scheme environment. Rice's PLC / "Dr. Scheme"
environment is nice on Windows. On *ix, pick up SIOD --- it's an absolutely
*tiny* interpreter implementation, easy to compile. (Though last time I
checked, it's nearly impossible to read the code w/o prettifying the
indentation. Lisp coders have an absolutely horrid brace style etc. when
they're forced to stoop to C.) SIOD is a fun C program to ponder, though,
so do take a look at the code at some point. (Probably contemporary with
reading Kamin, in the timeline below.)

Pick up Dybvig's "The Scheme Programming Language." Blow through it as fast
as you can. Ponder the examples. Come back and take a closer look later
on.

Pick up Abelson & Sussman's "The Structure and Interpretation of Computer
Programs." Take some time with this one.

Read all of the papers written or co-authored by Daniel Friedman. These can
be found by following links from the Internet Scheme Repository @
http://www.cs.indiana.edu/scheme-repository. What you're going for here is
a sense of the tradeoffs and design decisions that have influenced why
certain things are "first order" in Scheme and others are not, and for
illustrating how powerful a vehicle Scheme is for illustrating and
discussing high-level concepts.

Next, pick up a book about implementing a Scheme interpreter, or
interpreters in general. I recommend "Programming Languages: An
Interpreter-Based Approach" by Samuel Kamin. You can pick up a C++
implementation of all the Pascal code, by Timothy Budd, at various places on
the 'Net. This is interesting because it uses Scheme and Scheme syntax as a
sort of metalanguage vehicle for exploring all sorts of other language
concepts.

Next, you've got to go the full meta-circular route to interpretation and
complilation. There are several books out there that do the trick quite
well. (SICP, mentioned above, touches this but doesn't go nearly all the
way.) Lisp in Small Pieces by Christian Queinnec and Kathleen Callaway is a
decent one.

Finally, to really have the full monty, you've got to see about using Scheme
to implement interpreters and compilers for non-Scheme languages with
non-Scheme syntax. All the previous stuff is just a lead up to this point.
Buy "Essentials of Programming Languages" by Friedman et. al. Read every
word, cover to cover. Work every exercise. Grok fully. This is one of the
best books out there on programming languages, I kid you not.

There are several things you want out of Scheme that you're going to have a
hard time finding elsewhere in quite as concise or elegant a fashion. Here
they are:

    * a working knowledge of the lambda calculus in a real programming
context
    * the subtleties of scoping rules and binding disciplines (that last
sounds fun, eh?)
    * meta-circular interpretation
    * first-class continuations
    * program transformation techniques
    * continuation-passing style, and compiling from continuations

Have fun!

jb

>
> Thanks,
> John
>
> --
> John Klassa / klassa@mail.com


Date view Thread view Subject view Author view

This archive was generated by hypermail 2b29 : Mon Mar 20 2000 - 09:10:54 PST