On Tue, Apr 9, 2013 at 10:03 AM, rebcabin <bc.beck...@gmail.com> wrote:
> The workarounds seem to be disabling or removing the #= reader macro or > writing my own custom reader (in addition to a custom evaluator). > Disabling #= by binding *read-eval* to false would cause an exception if such an expression ever occurred within the code, yes. I don't know off hand exactly which functionality this would cut out from the application you are considering, but probably at least some, if not a crucial part of what you want. Note that even when binding *read-eval* to false, there is no promise that clojure.core/read or read-string won't have other side effects. They *might* happen to be free of side effects in Clojure 1.5.1, but you'd need to do your own code review, testing, etc. if it matters to you. In Clojure 1.3 and 1.4, even binding *read-eval* to false allows some side effects during reading. Examples of this are given at http://clojuredocs.org/clojure_core/clojure.core/read I would recommend asking the authors of clojail or other sandbox environments whether you can call clojure.core/read or read-string from *within* the sandbox, and have the sandbox's restrictions apply to any #= expressions encountered during the reading. Again, not sure if that would achieve your goals, but if it does, it sounds quicker than writing your own custom reader. If you do end up writing your own custom reader, and you prefer developing in Clojure rather than Java, and the Eclipse Public License doesn't present any problems for you, consider starting with the tools.reader contrib library: https://github.com/clojure/tools.reader Andy -- -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.