For communicating with an exec/eval child, once exec cannot run in the current namespace, I asked that it be possible to pass a read-only "current view" and to see a return value. (Guido): >... it's probably better to create an empty namespace and > explicitly copy into it ... > ... just pick certain things out of the namespace [afterwards] Yes and no. If the exec'ed code is well defined (and it needs to be if security is a concern), then that works well. For more exploratory code, it can be hard to know what in advance what the code will need, or to agree on the names of return variables. The simplest general API that I can come up with is "You're allowed to see anything I can" (even if it is in a nested scope or base class, and I realize that you *probably* won't need it). "Return value is whatever you explicitly choose to return" (Lisp's "last result" might be even simpler, but would probably lead to confusion other places.) -jJ
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4