[Arcana] John Wiegley just blew my mind.
roland at frob.com
Fri Jun 22 17:30:02 CDT 2012
P'shaw (and whippersnappers). Sending a form to an entirely different
Emacs process is a far cry from anything that really stands in for thread
support. Just see how long it takes someone to write something that uses
async-start to run an asynchronous function that wants to use a buffer, or
global variables with interesting state, etc.
Of course, if he had call/cc in elisp he could just implement asynchrony
using continuation capture in various blocking calls, the idle hook, etc.
But given the nature of Emacs's interpreter, implementing call/cc is
dubiously feasible at best. One can imagine something like the old SCM
trick of copying the C stack, in an unholy marriage with some underhanded
fiddling of the GCPRO machinery, and then some scheme (ahem) to avoid
leaking everything if the continuation object is dropped before application
(and what about GCPRO vs multiple applications??). And those are just the
gotchas that leap to mind for someone who has barely looked at the Emacs
implementation in over 15 years.
So, um, sorry, and I'm sure a man named Wiegley has got to be just lovely,
but I'll consider your mind defellated.
More information about the Arcana