Re: Impact of gen-class on clojure-ness

2010-03-29 Thread James Reeves
On Mar 29, 8:56 am, Steven Devijver wrote: > Thanks for your reply. I understand there are more clojure-ish ways > then to use Java interfaces, but I take from your answer that using > Java interface with gen-class won't introduce technical issues. It's possible, but Clojure isn't designed to wor

Re: Impact of gen-class on clojure-ness

2010-03-29 Thread Steven Devijver
On 29 mrt, 09:43, Jarkko Oranen wrote: > Interfaces are good, but defining your own is mainly reserved for Java > interop. You should strive to use plain old untyped data structures > for your data, ie. just put things in maps, vectors, sets andl lists. > Write (pure) functions to transform the

Re: [Noob] Impact of gen-class on clojure-ness

2010-03-29 Thread Stuart Halloway
Hi Steven, Skip interfaces and gen-class, and look instead at protocols and types. There is a simple example [1] in the labrepl [2]. (You will need to be on Clojure 1.2 bits, which labrepl does for you, and you should do in any case.) I think people will use protocols less frequently than

Re: Impact of gen-class on clojure-ness

2010-03-29 Thread Jarkko Oranen
> Specifically, I prefer to define the important components of my > software as Java interfaces. Partly to see myself think, partly > because it just makes more sense to me. I then want to implement these > interfaces using gen-class and clojure functions and pass resulting > objects as function ar

[Noob] Impact of gen-class on clojure-ness

2010-03-28 Thread Steven Devijver
Hi, I'm thinking about writing some piece of software completely in clojure (yeah!) However, it is my first time so I want to make sure I know what I'm doing. Specifically, I prefer to define the important components of my software as Java interfaces. Partly to see myself think, partly because it