Hello,

No, it's not possible, dot (.) is a special form and disallows this.

Search this mailing list for the subject "Help with the dot operator special
form" for a similar discussion on the ways to achieve more dynamic (runtime)
method resolution.

HTH,

-- 
Laurent

2009/3/25 ninix <nitzan....@gmail.com>

>
> Hi,
>
> Is there any way to get a "dynamic" member-symbol for use in the (.)
> special form?
>
> For example, I get the following exception:
> user=> (def obj (Object.))
> #'user/obj
> user=> (. obj (symbol "f"))
> java.lang.IllegalArgumentException: No matching method found: symbol
> for class java.lang.Object
>
> I expected this to behave like: (. obj f), so I can change the
> accessed member by changing the argument in (symbol ...), but was
> surprised by the result...
>
> Thanks
> >
>

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

Reply via email to