On Fri, Feb 01, 2008 at 09:06:25AM -0800, David Brown wrote: > >"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.
Can "properly tail recursive" simply mean it won't blow your stack like Python will? > >"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. When you say "compile time" that means "evaluation time" inside an interpreter like mit-scheme right? > 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 r ules, 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. Thanks. That cleared it up. I find it amusing that the fluid-let SRFI was killed. :) > >"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. It sounds like the general language neutral definition of expression is "anything that is a valid statement in the language". > >"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 tail call just means a function calls itself at the end? > 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. Thanks. That cleared it up. Chris -- [email protected] http://www.kernel-panic.org/cgi-bin/mailman/listinfo/kplug-lpsg
