Good day Alex, picoLisp list - Why does declaring a parameter named 'args', in a function that does NOT use the '(args)' call, break things severely ?
I had a function that does NOT use the built-in 'args, but which declared a parameter named 'args : (de a ( fun data args ) (let ( (flg list x) args ) # destructuring bind (prog ... # eventually, fun gets called with unpacked args: (fun data flg list x) ) ) ) Then eventually 'fun calls a function that calls '(args) : '(request! '(+myDbCls) ... ) which DOES use args, at which point I got an error: !? ((0 NIL 16661165511231956559 (15935676839705835219 (12638994734423517827 ... 0 -- Variable expected Renaming the parameter 'ars (or 'as :-) ) fixed the problem. Why ? I thought parameters and '(let ..) variables are in their own dynamic lexical scope, so that even if the 'args call is hidden in the 'a function, if 'a calls another function 'fun, and that calls a function which calls 'request!, the binding of 'args in request cannot possibly be affected by the binding of 'args in 'a. This turns out to be incorrect ! Where am I going wrong ? This took me a LONG time to find. My only clue was that 'list does look like : ((0 NIL 16661165511231956559 (15935676839705835219 (12638994734423517827 ... Any suggestions as to exactly how the binding of 'args in 'a gets called by 'request! would be much appreciated. Thank You & Best Regards, Jason -- UNSUBSCRIBE: mailto:picolisp@software-lab.de?subject=Unsubscribe