Hi Christophe,
> I'm quite surprised of the use of setq instead of let.
> Could you please elaborate?
Do you mean, staying with the generated example code:
(de foo X
(setq X (car X))
(msg X)
(length (eval X)) )
to generate instead:
(de foo X
(let X (car X)
On Mon, Oct 16, 2017 at 3:25 PM, Alexander Burger wrote:
> This is just unnecessary overhead, as 'let' is basically 'bind' (or 'use' to
> be
> more correct) plus 'setq'. And 'X' is bound already by the function call. So
> why
> waste time and (stack)space?
Because I thought that setq would stor
On Mon, Oct 16, 2017 at 03:44:54PM +0200, Christophe Gragnic wrote:
> Because I thought that setq would store a value in the parameter var
> "more permanently".
> Something like:
>
> : (foo (need 3))
>(need 3)
>-> 3
> : X
> -> (need 3) # what I expected
>
> I thought using a let w
> My question: which mechanism frees X of the value it was setq-ed?
During function execution, the variables (symbols actually) used as parameters
(in the function definition) are like in an implicit (let):
When executing, the values are bound to the arguments as specified in the
function call,
Good bye Peyton Farrar :-(
You are now unsubscribed
--
UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe