How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Denis Labaye
Hi, I'm writting Clojure code that is used by a Java framework (Fitnesse's slim for those who knows). To workflow is like this: Instanciation of a new Java objectf = new Foo()Initialization with settersf.setBar(ze bar)And then call some methodsf.baz() My solution is something like: (ns Foo

Re: How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Gary Trakhman
sounds fun, have you seen this yet? http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ On Fri, Jun 7, 2013 at 3:21 PM, Denis Labaye denis.lab...@gmail.com wrote: Hi, I'm writting Clojure code that is used by a Java framework (Fitnesse's slim for

Re: How to cleanly interface with a Java lib that requires mutability?

2013-06-07 Thread Denis Labaye
On Fri, Jun 7, 2013 at 9:28 PM, Gary Trakhman gary.trakh...@gmail.comwrote: sounds fun, have you seen this yet? http://cemerick.com/2011/07/05/flowchart-for-choosing-the-right-clojure-type-definition-form/ wicked cool thx I'll do this then : (deftype Foo [^{:volatile-mutable true} x]