On Friday, March 3, 2017 at 9:42:30 AM UTC-5, Ernesto Garcia wrote:
>
>
> Can you point out to some implementation of this kind? I don't know what
> you are referring to here. Would AOT compilation help in my case?
>
>
In the clojure toolbox, the first entry under data structures is
aatree: htt
On Thursday, March 2, 2017 at 3:36:53 AM UTC+1, William la Forge wrote:
>
> Alternative implementations for clojure maps are hard. You tend to use AOT
> a lot, which is non-idiomatic. But a number of people have done this,
> including myself. In retrospect, it isn't worth it. At least not most of
On Wednesday, March 1, 2017 at 3:21:51 AM UTC+1, Mikera wrote:
>
> You might want to try implementing a small wrapper class that implements
> ILookup.
>
> Then you can do something like:
>
> (:keyword (MyWrapper. my-obj))
>
Yeah, but to be more convenient, it would need to return a wrapper in cas
On Tuesday, February 28, 2017 at 9:40:12 PM UTC+1, Alex Miller wrote:
>
> If it follows Java bean semantics, you can use the `bean` function to view
> it as a map with properties as keys.
>
The class is not actually a bean. It contains a map, with a
.getPropertyValue method, but it doesn't impl
Alternative implementations for clojure maps are hard. You tend to use AOT
a lot, which is non-idiomatic. But a number of people have done this,
including myself. In retrospect, it isn't worth it. At least not most of
the time.
One thing that really bothers me is that Java supports subMap. And
You might want to try implementing a small wrapper class that implements
ILookup.
Then you can do something like:
(:keyword (MyWrapper. my-obj))
Prefer composition over inheritance, etc.
On Wednesday, 1 March 2017 04:12:06 UTC+8, Ernesto Garcia wrote:
>
> Hi all,
>
> I am using Java class that
If it follows Java bean semantics, you can use the `bean` function to view
it as a map with properties as keys.
user=> (bean (java.util.Date.))
{:day 2, :date 28, :time 1488314343215, :month 1, :seconds 3, :year 117,
:class java.util.Date, :timezoneOffset 360, :hours 14, :minutes 39}
On Tuesda
Hi all,
I am using Java class that acts as a map, but doesn't implement Map. (It's
not in my hands to modify it).
I would like to do the usual lookup code:
(:keyword my-obj)
I can't make the class extend ILookup, as ILookup is an interface, not a
protocol.
Do you know of any other way to achi