Re:The idiot's guide to special variables and lexical closur...
by AlainPicard on Saturday July 22, 2017 @08:42PM
(#14830276)
For me the largest difference is that Clojure carries
over all your dynamic bindings when creating new
threads (via 'future') and in lazy seqs, whereas
Common Lisp (typically) does not. I now understand
why they choose to do it this way, but I wish the documentation was much clearer in this regards.
[ Parent
| on HN ]
Re:The idiot's guide to special variables and lexical closur...
by lisper on Saturday July 22, 2017 @08:51PM
(#14830303)
The CL standard doesn't deal with threads at all, so different implementations do things differently. But typically the user can control what the initial bindings of a thread are through keyword arguments to whatever function spawns threads.
Re:The idiot's guide to special variables and lexical closur...
by kazinator on Sunday July 23, 2017 @10:37AM
(#14832431)
I made a dialect once called VoqLisp in which a thread carried the dynamic bindings visible in the code which spawned it.
This then resembled POSIX environment variables: "FOO=bar command arg" and was handy in a similar way. You could use let to set up a bunch of parameters affecting the thread, and then create it in that body.