Why would I write the class in Java, when this below works exactly as expected?

(ns foo
  (:gen-class :name foo.Bar
              :extends java.lang.System$LoggerFinder
              :constructors {[] []}))

(let [slm (delay (-> 'foo/system-logger-memo
                requiring-resolve
                var-get))]
  (defn -getLogger
"Returns a subclass of `System$Logger` which routes logging requests to the `core/*root*` logger." [this name module] ;; resolve it at runtime (and only once), ;; in order to prevent AOT leaking out of this ns (@slm)))


My question boils down to this:

Let's say that I used clojure1.10 to compile the above gen-class. Does the project containing it need to specify Clojure 1.10 as a proper dependency, or will the end user be able to provide any version of Clojure greater or equal to 1.10?

Thanks in advance...

Kind regards,

Dimitris


On 23/08/2019 02:00, Matching Socks wrote:
You are considering gen-class as an alternative to writing the service-provider class in Java and using only methods in Clojure's public Java API to connect it with an implementation-in-Clojure?
--
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
---
You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com <mailto:clojure+unsubscr...@googlegroups.com>. To view this discussion on the web visit https://groups.google.com/d/msgid/clojure/0660b640-cf91-429b-9a40-1695e7955aef%40googlegroups.com <https://groups.google.com/d/msgid/clojure/0660b640-cf91-429b-9a40-1695e7955aef%40googlegroups.com?utm_medium=email&utm_source=footer>.

--
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
--- You received this message because you are subscribed to the Google Groups "Clojure" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to clojure+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/clojure/705bcd0f-6c4f-a928-0859-e5b6e3c31126%40gmail.com.

Reply via email to