Arc Forumnew | comments | leaders | submitlogin
2 points by eds 6131 days ago | link | parent

I still don't see why something like this wouldn't work for most cases:

http://arclanguage.org/item?id=4481

If you did this for all local variables, and then used namespace-undefine-variable! to delete any defs that had been evaluated, I think you would get a fairly well restricted eval.



4 points by lacker 6131 days ago | link

I agree with you - I think this is roughly the right idea, I just hadn't found namespace-undefine-variable! when I asked this question.

I think there's still somewhat of a problem with wrapping variables in a "let" with their deep copies - that prevents internal code from wrapping builtins and having other builtins use the wrap, because the let will make the builtin-wrap scope different from the outer scope. But you can do the special-suffix thing in this case.

-----