Hacker News new | ask | show | jobs
by KingMob 3325 days ago
Would be lovely if they officially supported Clojure too.
5 comments

As much as I want this, it's not going to happen for the simple reason that Clojure adds a big runtime and a huge startup cost on Android, which is unacceptable. It's fine for servers, but a total deal-breaker for mobile apps.

Kotlin on the other hand has a tiny runtime (< 1 MB before dead-code elimination etc with Proguard) and negligible startup cost - in fact several popular Android libraries have a bigger startup cost impact than Kotlin.

I'd love that too, but there is a startup time overhead with the Clojure runtime. Given the moves Google's made in recent wrt moving away from JIT for startup time reasons, this would be challenging.
Google has chosen to support kotlin because the community has very strongly pushed in that direction.

I am not too familiar with Clojure, what would it bring us that kotlin (or java) don't have ?

Parenthesis.

And lots of other things too. I just wanted to make a lisp joke. I will see myself out.

I'm with you, but I think the size and startup time of Clojure might be a big hurdle.
If you want to use Clojure on Android, I'd recommend Clojurescript and React Native https://github.com/drapanjanas/re-natal