Apart from being blasphemous - would it be a good idea to override clojure.lang.Ref in Java land?
I want to create (children of?) refs in clojure that send an agent when they change, so that I can create facilities to observe changes to them. Creating a 'MyRef extends Ref' seems to be the obvious Java way. Don't know whether the #^clojure.lang.Ref tags in the clojure ref functions would cause problems, though (is it like instanceof or is it a (arg.getClass() == ... comparison?). This might be the easiest way for a Java developer, but shouldn't it be possible to develop this in Clojure land in an easy manner? On 16 Dez., 20:58, Rowdy Rednose <rowdy.redn...@gmx.net> wrote: > Can I listen on changes done to refs? > > Let's say in a scenario like that > onhttp://en.wikibooks.org/wiki/Clojure_Programming#Mutation_Facilities > could I add a facility that allows the registration of listeners that > get called on certain changes to the refs? > > For example I'd like to be notified on all changes to employees where > name is "Jim". --~--~---------~--~----~------------~-------~--~----~ 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 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 -~----------~----~----~----~------~----~------~--~---