On Thu, Jan 31, 2008 at 09:58:30PM -0800, [EMAIL PROTECTED] wrote:

If anyone knows what these terms mean it would help me and others.

I'll try.

"properly tail recursive" (Is there such thing as improperly tail recursive?)

I'm not sure what improperly tail recursive would mean.  It is a bit
redundant to say properly tail recursive, but it emphasizes to the reader
that there is something special about tail recursion in Scheme vs non-tail
calls.

"statically scoped" (Scope to me just means the parens in which a bound symbol
                      is valid. What's with the 'static' part?)

Statically scoped means that the variable binding can be determined at
compile time.  Dynamic scoping means the scoping is determine by the call
flow at runtime.  Few languages support dynamic scoping, although it is
easy in common lisp, and possible in Scheme.

Some schemes implement the (now withdrawn) srfi-15
<http://srfi.schemers.org/srfi-15/srfi-15.html> for fluid-let.

Probably best to explain by example.

  (define x 5)

  (define (show-x)
    (print x))

Ordinary static binding:

  (let ((x 10))
    (show-x))

will print 5.  The static scoping rules, mean that the 'x' that is created
by the let is different than the one that show-x is using.

But:

  (fluid-let ((x 10)
    (show-x)

will print 10.  The easiest way to think of it is that the dynamic binding
in the fluid-let saves off the old value of 'x' and puts 10 in while it's
body is running.

"expression" (I have an intuitive idea what this means but wondering what the
            formal def is.  Is it 'expression = anything that is evaluated' ?)

Expressions in scheme are literal values, variable references, and
procedure calls.  There are also derived expressions from macros and
special forms.

"message passing [programming] styles" (What is this?)

A style of programming where parts of the program interact by sending each
other messages.  This is where scheme started.  They discovered that the
message passing syntax they were trying to invent was exactly the same as a
tail call.

A message passing style of programming in Scheme would involve functions
that always end with a tail call.

"a very small number of rules for forming expressions, with no restrictions on
how they are composed"  (forming means to build...what does 'compose' mean?)

Generally, it is used to indicate building expressions out of functions.
Any time you use a function name somewhere other than the first element of
a form, you are composing.  SICP hasn't gotten to this, yet.

"[Scheme is] one of first programming languages to incorporate first class
procedures as in the lambda calculus" (Huh? Lisp had first class *functions* a
long time ago.  Does procedure != function?)

The distinction is that in other lisps (including common lisp) you need a
special syntax to call a first class function.  They have to be used and
manipulated differently.

"distinguish procedures from lambda expressions and symbols" (I'm lost on what
procedures mean to the Sussman.)

Probably about what you think.  But it is an important distinction which is
part of what makes scheme a lot easier to batch compile than common lisp.

A lambda expression is something of the form

  (lambda (x y z) ...)

But, this isn't a procedure, at least not yet.  It has to be compiled to
produce a procedure.  The procedure is often a piece of machine code.
'Eval' was only very recently added to the Scheme specification.

In 'C', for example, when I write a function 'foo', there really isn't much
distinction between the symbol 'foo' and the function itself.  Yes, I can
take the address of the function, but that address is kind of a different
object than the function itself.  In scheme, symbol and specifically the
variable just stores the function in it.  You could replace that variable
with a different function or even something that isn't a function.

"first class escape procedures from which all previously known sequential
control structures can by synthesized." (I don't even have a clue for this
one.)

One call "call-with-current-continuation" (call/cc), which is probably
worthy of its own course :-)

If you know what setjmp/longjmp do in C, it's that kind of idea, except
that the thing is first class so it can be jumped to repeatedly and even
after the scope of its creation is left.  It really shows the essence of
the scheme philosophy.  Scheme only supports one construct for control
flow: call/cc.  With that, people have implemented exceptions, generators,
multi-threading, etc.

I would wait to figure it out until getting a good grasp of the rest of
Scheme.  call/cc can be a bit of a mind bender.

Dave

--
[email protected]
http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg

Reply via email to