I recently ran into the foo.toSource() option in JavaScript. This allows a serialization of a function. I was wondering about the possibilities of transferring functions over the networks, from server to client, and executing them at a later time - with eval().
Do you think it's actually useful?
Are there any frameworks using such a paradigm?
Passing functions from the server to a page can be done without toSource, by just putting it in the code when the page is generated on the server, or requesting it via AJAX when needed.