3 ms·
Well, a closure can't be more than a couple hundred bytes, I guess. If he wants to continue with that technique, I'd hack it like this: use reflection to crawl
by wlievens 13y ago
Well, a closure can't be more than a couple hundred bytes, I guess.
If he wants to continue with that technique, I'd hack it like this: use reflection to crawl the closure, isolate the variables bound to the closure context, serialize those (the user id's, post id's, etc). Then the closure code, which will be one of only a few "templates", can be put into a global dictionary. The serialized state goes into the URL parameters. The closure is collected, and "reified" from the global dictionary and URL state once the user performs the action.
I don't know if LISP's reflection can pull this off, but I'm pretty sure it's no biggie.