On Dec 25, 12:01 pm, Alan Malloy <a...@malloys.org> wrote:
>
> Presumably you just tried it and found it doesn't work, so I'm not
> sure what more you're looking for here. How would you even fill in the
> body of the proxy? "I don't know what class this is, but I know
> exactly what methods I need to override"? Probably you need to rethink
> some things to get a design that doesn't require something so magical,
> but eval is always available to you if you have some reason to believe
> you require magic.

Yes, eval. I forgot about it. Eval is something I categorized as
dangerous in my mind a long time ago, and decided never to use it. It
seems that I also erased it from my memory. :)

My expectation here is that proxy expects a value which for the base
class, which is a java class (an instance of java.lang.Class), and I'd
like to pass this value as a function parameter.

>From design point of view, my proxy contruct tries to add an interface
to a class. (Like a mixin). The interface is always the same (and
therefore the methods), but the class can be anything, and i'd like to
have it as a parameter to the function.

Macros work fine, but I want to try to have it as a function.

Razvan

-- 
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

Reply via email to