On Dec 22, 5:48 pm, Brian Goslinga <brian.gosli...@gmail.com> wrote: > On Dec 22, 8:52 am, Razvan Rotaru <razvan.rot...@gmail.com> wrote:> What do > you mean by site? > > For example, how is it when I'm creating my proxy inside a macro? (and > > assuming this macro is called many times) > > > (defmacro [a-class] > > (proxy (a-class) ....)) > > > Razvan > > Once all code is macroexpanded, every use of proxy (actually what > proxy expands into) will result in a new class.
It turns out even this is not true, because proxy uses some kind of deep JVM magic called (appropriately) Proxy Classes. So every time you write (proxy [Object] (...anything at all...)), you get an instance of the same class, initialized with a different map of function pointers. That is, for any superclass and set of interfaces, exactly one proxy class exists (possibly one per namespace?), of which all such proxy objects are instances. -- 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