> (If you can forgive a PicoLisp n00b shoving his face into the discussion...)
Sure! Welcome anytime :)
> You actually have that the opposite way around. Tail call
> elimination (tail recursion is just one special case of tail calls)
> is a *semantic* rule that says that a function's activation no
> longer has any influence on anything after its final call has been
> engaged. Since it has no influence on anything, it is also
I disagree. Thorsten's question was if it makes sense in an
_interpreter_. And I think it does _not_ make sense, because you cannot
do TCE while interpreting List structures. You have to do it in the
compiler, as it requires some analysis of the code structure.
In general, I think recursion is overvalued. It used to excite computer
scientists in the dark ages of computing, causing awe and wonder when a
subroutine was able to call itself.
In a languge like PicoLisp, recursion is only necessary when you have
recursive data structures (like trees), and those cases are typically
not tail recursive.
For most common cases you directly write a loop with 'do', 'loop',
'while', 'until', 'for' etc., which let you express more clearly what
the code is supposed to do.
> PicoLisp's dynamic scope rules mean that a function's activation can
Please avoid the term "dynamic scope". There is no such thing in PicoLisp.
PicoLisp has "dynamic binding".
"Scope" is concerned about the _visibility_ of symbols. And normal
(internal) symbols always have a global scope in PicoLisp. Transient
symbols have a file-local scope, while external symbols have a DB-wide
scope (which usually spans many processes or even remote machines).
"Binding" is concerned about how _values_ are assigned to symbols.
This is also a bit explained in the FAQ:
The Scheme people seem to always confuse this, because Scheme has no
clear separation between symbols (which have a distinct identity in real
Lisp) and their bindings. When you write the name of a variable in
Scheme, it is just a name for a value on the stack frame, and afaik
there is no "binding" of a symbol involved.