Are there any problems with enabling the flag written in clojure as part of the android app?

I am developing a standard Android application (in java), but would like to implement a part of the "business logic" other than the UI in clojure. Are there any flaws in this, or problems that I should know about, that this would be a bad idea?

I did a simple test calling function in the trivial clojure library from an Android application, and this turned out to be without any obvious problems.

I saw comments about problems regarding clojure.jar boot time, but in my case clojure does not handle the user interface.

I don't understand if there are other memory or performance issues that I should worry about.

January 16, 2017 Patch

I ran into some problems when trying to use some more complex clojure libraries, in particular, which depend on core.async.

With standard clojure 1.8 as a dependency, I tried:

new ClassDefinedInClojure() 

where ClassDefinedInClojure is the Java class generated by AOT, but I got:

 java.lang.VerifyError: Rejecting class clojure.core.memoize.RetryingDelay because it failed compile-time verification 

I assumed that this was the result of the same problem as here:

http://dev.clojure.org/jira/browse/CLJ-1472

But the problem still existed even after I rebuilt clojure 1.8 with the patch ( http://dev.clojure.org/jira/secure/attachment/15351/clj-1472-2.patch ).

I know about the specific construction of android clojure https://github.com/clojure-android/clojure , but to be honest, it is not clear how this differs from normal clojure and why it is necessary. I tried using this as an alternative to the clojure standard library, but had the same problem.

As for my initial question, this was helpful - http://blog.ndk.io/state-of-coa.html

+6
source share

Source: https://habr.com/ru/post/1014038/


All Articles