Raynes/tryclojure

Sandbox error when testing Runtime Polymorphism

pauldoo opened this issue · 2 comments

I tried to use "http://www.try-clojure.org/" using code from the "Runtime Polymorphism" page of the Clojure website:

http://clojure.org/runtime_polymorphism

This gave a security exception (the details of which I cannot copy paste from the browser, which is quite annoying).

This is the line that caused the error:

(defmulti encounter (fn [x y] [(:Species x) (:Species y)]))

Yeah, sorry about the copying. That's a side-effect of using jquery-console. I need to whine to Chris until he adds optional paste/copy support. :p

Anyways, the problem is defmulti. Support for def-anything is quite touchy right now. I'll look into this.

Surely try-clojure would be better as a Java applet running client side? That way you don't need to sandbox anything, and hosting would be much simpler.