Arc Forumnew | comments | leaders | submitlogin
1 point by aw 4832 days ago | link | parent

I haven't programmed in Common Lisp enough myself to tell for sure, but just looking at http://cl-cookbook.sourceforge.net/process.html they do appear to be similar -- at least in the sense of having a per-thread state.


1 point by rocketnia 4832 days ago | link

I haven't heard of an implementation of CL with call/cc (but maybe I just haven't looked very hard XD ). Because of that, I think simulating a Racket parameter in Common Lisp would be just the same as simulating a Racket preserved thread cell (i.e. a thread-local box which is initialized in each thread to the value it had in the parent thread).

If 'defvar (and 'defparameter too?) dynamic variables have per-thread state, the next question is whether they're "preserved," and after that it's a matter of whether they have their own quirky properties or additional features apparent only in context. For instance, a Racket parameterization may or may not map well to a Common Lisp dynamic environment.

But maybe the more important question is: What do you expect from an implicit variable, and is 'defvar sufficient for that? For my purposes, any Arc global variable is (usually) sufficient, and I use Lathe's 'w/global to rebind one for a naive dynamic extent.

-----