Writing an Android application with Clojure

464 views
Skip to first unread message

Cecil Westerhof

unread,
Aug 31, 2017, 6:45:08 AM8/31/17
to clo...@googlegroups.com
It has been a while that I worked with Clojure and I want to pick it up again. I also want to pick up Android programming. (That is new for me.) I am thinking about doing those together. Would that be doable?
Also is writing Android applications with Clojure still viable? Because the Clojure-Android mailing-list is very silent.

--
Cecil Westerhof

Luke Gessler

unread,
Aug 31, 2017, 8:53:58 AM8/31/17
to Clojure
Check out cljsrn.

Cecil Westerhof

unread,
Sep 2, 2017, 3:59:36 AM9/2/17
to clo...@googlegroups.com
2017-08-31 14:46 GMT+02:00 Luke Gessler <lukeg...@gmail.com>:
Check out cljsrn.

​Thanks, but from https://www.youtube.com/watch?v=mVXTcAEKgF8 I understood it is better to go native.​
 

--
Cecil Westerhof

Didier

unread,
Sep 2, 2017, 5:55:21 PM9/2/17
to Clojure
Well, in the last 2 years I think React Native has grown quite a bit. I think if you target Android only, and you need performance, like a game, going with Java/C is best, or just Unity.

But ClojureScript with ReactNative is great for iOS + Android compatibility for more normal apps.

I don't think Clojure for native is a great experience, you can experiment with it, but I wouldn't use it for a real commercial app.

Cecil Westerhof

unread,
Sep 3, 2017, 3:01:55 AM9/3/17
to clo...@googlegroups.com
2017-09-02 23:55 GMT+02:00 Didier <did...@gmail.com>:
Well, in the last 2 years I think React Native has grown quite a bit. I think if you target Android only, and you need performance, like a game, going with Java/C is best, or just Unity.

​Another possibility would be Kotlin. I was first thinking about that, but then I thought that I could use Clojure to get experience with it again.
 
 
But ClojureScript with ReactNative is great for iOS + Android compatibility for more normal apps.

​I have to evaluate it then​
 
 

On Saturday, 2 September 2017 00:59:36 UTC-7, Cecil Westerhof wrote:
2017-08-31 14:46 GMT+02:00 Luke Gessler <lukeg...@gmail.com>:
Check out cljsrn.

​Thanks, but from https://www.youtube.com/watch?v=mVXTcAEKgF8 I understood it is better to go native.​
 

 
On Thursday, August 31, 2017 at 5:45:08 AM UTC-5, Cecil Westerhof wrote:
It has been a while that I worked with Clojure and I want to pick it up again. I also want to pick up Android programming. (That is new for me.) I am thinking about doing those together. Would that be doable?
Also is writing Android applications with Clojure still viable? Because the Clojure-Android mailing-list is very silent.

--
Cecil Westerhof

Didier

unread,
Sep 3, 2017, 2:23:24 PM9/3/17
to Clojure
Kotlin is actually officialy supported on Android, so definitly a good choice there. That said, if you know Java, C#, C++, Pascal, or even ActionScript 3, Kotlin brings nothing new to the table conceptually. It does improve on convenience over Java though. So I'd still recommend you also spent some time learning a conceptually different language such as Clojure/Script, Haskell, F#, Ocaml, Prolog, Forth, C, Rust, Red, etc.

Unfortunately, Android lacks any proper alternative to mainstream computational models.

Srihari Sriraman

unread,
Sep 5, 2017, 7:04:33 AM9/5/17
to Clojure
> Well, in the last 2 years I think React Native has grown quite a bit.

So has Clojurescript, and the rapport between them. See https://groups.google.com/forum/#!msg/clojure/4wz8d1FJ9tU/rBZpEqt_AAAJ if you're looking for a case-study with some magnitude.
My personal experience in building out 3 small apps has been pretty solid. Feedback cycles are great, and delivery is quick. Sure it's not capable of building performant games, etc, but I think it's only a matter of time.

On slack, clojurians#cljsrn seems quite active. Also see http://cljsrn.org/.

Cheers!
Srihari

Cecil Westerhof

unread,
Sep 5, 2017, 7:14:33 AM9/5/17
to clo...@googlegroups.com
2017-09-03 20:23 GMT+02:00 Didier <did...@gmail.com>:
Kotlin is actually officialy supported on Android, so definitly a good choice there.

​I started with Kotlin. I think I first learn to write some applications for Android and then decide if I want to switch to Clojure(Script).

 
That said, if you know Java, C#, C++, Pascal, or even ActionScript 3, Kotlin brings nothing new to the table conceptually. It does improve on convenience over Java though.

​I know Java and C++. A long time ago I worked with Pascal.

What I like about Kotlin is that it is less verbose. And Clojure is of-course even less verbose. :-D

--
Cecil Westerhof

Didier

unread,
Sep 5, 2017, 3:04:32 PM9/5/17
to Clojure
​I know Java and C++. A long time ago I worked with Pascal.

What I like about Kotlin is that it is less verbose. And Clojure is of-course even less verbose. :-D

Oh yea, and Kotlin exists pretty much only to address Java's verbosity, and maybe a few small other quirks, and it did a great job at that. But you won't learn anything new conceptually. All you will learn is a new less verbose syntax for the same concepts. I honestly just hope Kotlin pushes future Java versions to improve on their verbosity and quirks, so that we don't need Kotlin in the future, but Java is not a pain to use anymore. I like Kotlin, but its also dumb to have a whole new JVM language works the same conceptually, just because Java never bothered improving on its quirks and verbosity.

Colin Fleming

unread,
Sep 6, 2017, 4:09:27 AM9/6/17
to clo...@googlegroups.com
Kotlin offers a lot more than just less verbose code and fixing quirks. It's a sufficiently large step up over Java that the experience of using it is completely different, in my experience. The null-safe type system is worth the price of entry alone. I totally recommend it for Android projects.

Sometimes a language offers a combination of existing concepts in a coherent package which is somehow greater than the sum of its parts - languages don't have to be innovative to be useful, pleasant and powerful. Clojure itself is such a language. We already had good lisps. We already had good JVM functional languages. We already had languages with persistent data structures. We already had languages with STM, good concurrency support, interactive development and all the rest of it. But the pragmatic combination of those features made (and continues to make) it very compelling.

Kotlin is another such language. I think there's a strong case to be made for using React Native for mobile dev, and ClojureScript's story is very good there. But personally I think you'd be nuts to choose JVM Clojure over Kotlin for serious Android development.

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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+unsubscribe@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+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Didier

unread,
Sep 7, 2017, 12:40:01 AM9/7/17
to Clojure
I think you'd be nuts to choose JVM Clojure over Kotlin for serious Android development.

Yes, totally, just to clarify:

1) I don't recommend using JVM Clojure for Android development apart for just toy projects.
2) I do recommend using ClojureScript with React Native for Android development, when it make sense, like standard apps which don't need crazy performance, or specific Android gadgetry, and also should work on iOS.
3) Kotlin is definitely a nice Imperative OOP language, which some functional sprinkle. I like it quite a bit.
4) Kotlin is more fun to use then Java, and is an officially supported language on Android, and is a great choice for Android development when ClojureScript + React Native turned out to not be enough.
5) Kotlin will not change your mental model, if you have experience with Java, C#, Pascal, C++, and other static OOP languages with sprinkles of functional programming. If that's not your goal, then there's nothing wrong with it.
6) I haven't used Kotlin enough, and I think its a little too young to know if its choices are actually better then Java's, or C#'s choices. Though probably better then Java's.
7) I recommend when learning new languages, to pick languages which will challenge and enhance your mental models, so I recommend learning Clojure for that alone.
8) If you want to learn Android development, Java or Kotlin will do, but if you already know Java, and you're focused on learning Android, that will be enough, since really its about learning the Android SDK and environment.
9) If you're going to consider building a serious Android App, and ClojureScript + React Native was not enough, then I would consider Kotlin very heavily, as it will probably make it more fun and enjoyable, while still being robust.

On Wednesday, 6 September 2017 01:09:27 UTC-7, Colin Fleming wrote:
Kotlin offers a lot more than just less verbose code and fixing quirks. It's a sufficiently large step up over Java that the experience of using it is completely different, in my experience. The null-safe type system is worth the price of entry alone. I totally recommend it for Android projects.

Sometimes a language offers a combination of existing concepts in a coherent package which is somehow greater than the sum of its parts - languages don't have to be innovative to be useful, pleasant and powerful. Clojure itself is such a language. We already had good lisps. We already had good JVM functional languages. We already had languages with persistent data structures. We already had languages with STM, good concurrency support, interactive development and all the rest of it. But the pragmatic combination of those features made (and continues to make) it very compelling.

Kotlin is another such language. I think there's a strong case to be made for using React Native for mobile dev, and ClojureScript's story is very good there. But personally I think you'd be nuts to choose JVM Clojure over Kotlin for serious Android development.
On 6 September 2017 at 07:04, Didier <did...@gmail.com> wrote:
​I know Java and C++. A long time ago I worked with Pascal.

What I like about Kotlin is that it is less verbose. And Clojure is of-course even less verbose. :-D

Oh yea, and Kotlin exists pretty much only to address Java's verbosity, and maybe a few small other quirks, and it did a great job at that. But you won't learn anything new conceptually. All you will learn is a new less verbose syntax for the same concepts. I honestly just hope Kotlin pushes future Java versions to improve on their verbosity and quirks, so that we don't need Kotlin in the future, but Java is not a pain to use anymore. I like Kotlin, but its also dumb to have a whole new JVM language works the same conceptually, just because Java never bothered improving on its quirks and verbosity.

On Tuesday, 5 September 2017 04:14:33 UTC-7, Cecil Westerhof wrote:
2017-09-03 20:23 GMT+02:00 Didier <did...@gmail.com>:
Kotlin is actually officialy supported on Android, so definitly a good choice there.

​I started with Kotlin. I think I first learn to write some applications for Android and then decide if I want to switch to Clojure(Script).

 
That said, if you know Java, C#, C++, Pascal, or even ActionScript 3, Kotlin brings nothing new to the table conceptually. It does improve on convenience over Java though.

​I know Java and C++. A long time ago I worked with Pascal.

What I like about Kotlin is that it is less verbose. And Clojure is of-course even less verbose. :-D

--
Cecil Westerhof

--
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to clo...@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

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+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages