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 interfaces, but
with greater leverage.
Stu
[1]
http://github.com/relevance/labrepl/blob/master/src/solutions/rock_paper_scissors.clj
[2] http://github.com/relevance/labrepl
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 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 arguments.
My question is: does this combination of Java interfaces and gen-class
impact clojure-ness in any way? In other words, would I be living in a
different world if I would just implement my functions and pass those
functions around as function arguments without using Java interfaces
and gen-class?
Thanks
Steven Devijver
--
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.
--
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.