On 29 mrt, 09:43, Jarkko Oranen <chous...@gmail.com> 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 data, and some logic to handle
> program state. Try to keep a clear separation between state-handling
> or "interactive" code and data-handling logic. Also make use of
> Clojure's sequence abstraction. The core libraries have many functions
> for processing sequences.
>
> The core abstraction in Clojure is a function. There is a feature
> called "protocols" in git master that will become the Clojure way of
> defining interfaces, but even if it is a protocol, the interface is
> simply a collection of functions. If you're used to object oriented
> programming, you need to invert your thought process from "What
> methods does this object have?" to "What data can this function
> process?"

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.

-- 
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 from new members are moderated - please be patient with your 
first post.
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

To unsubscribe from this group, send email to 
clojure+unsubscribegooglegroups.com or reply to this email with the words 
"REMOVE ME" as the subject.

Reply via email to