> There's also defrecord
I considered using that, but I need to do something more with the
constructor (e.g. convert the map into a Java array for internal
use). Also, defrecords only takes positional arguments, which will be
hard to use with tens of arguments. (An alternative is just to pass
in
On Fri, Feb 10, 2012 at 1:07 PM, Aaron Cohen wrote:
> On Fri, Feb 10, 2012 at 3:13 AM, drewn wrote:
>> I've just started learning protocols, deftype, etc. The first thing I
>> did was try to extend a Clojure type (maps) to operate as a
>> specialized Java Swing interface (AttributeSet), forgetti
On Fri, Feb 10, 2012 at 3:13 AM, drewn wrote:
> I've just started learning protocols, deftype, etc. The first thing I
> did was try to extend a Clojure type (maps) to operate as a
> specialized Java Swing interface (AttributeSet), forgetting that
> interfaces are not protocols; i.e.
>
> (extend-t
> Nope, can't be done. Java interfaces can't do this.
I'm glad I asked the question. Given that it can't be done, any
suggestions for the best way of handling this interop scenario?
--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this gro
Nope, can't be done. Java interfaces can't do this.
Java 8 may have "Interface Injection" which will make this possible.
-S
--
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
I've just started learning protocols, deftype, etc. The first thing I
did was try to extend a Clojure type (maps) to operate as a
specialized Java Swing interface (AttributeSet), forgetting that
interfaces are not protocols; i.e.
(extend-type clojure.lang.PersistentArrayMap
javax.swing.text.Att