4 ms·
The author switched to kotlin from clojure, kotlin's interop with java is leagues ahead of clojure.
by Scarbutt 8y ago
The author switched to kotlin from clojure, kotlin's interop with java is leagues ahead of clojure.
- zeroDivisible 8y agoI do not have experience with Kotlin and it's interop with Java. Do you maybe have examples or articles which you'd recommend on the subject?
- Scarbutt 8y agoThe official reference: https://kotlinlang.org/docs/reference/java-interop.html https://kotlinlang.org/docs/reference/java-interop.html
- fgonzag 8y agohttps://kotlinlang.org/docs/reference/java-to-kotlin-interop.html https://kotlinlang.org/docs/reference/java-to-kotlin-interop... https://kotlinlang.org/docs/reference/java-interop.html https://kotlinlang.org/docs/reference/java-interop.html https://developer.android.com/kotlin/interop https://developer.android.com/kotlin/interop
- Per_Bothner 8y agoMay I suggest Kawa (https://www.gnu.org/software/kawa https://www.gnu.org/software/kawa) if you're open to Lisp-style syntax (Kawa is a Scheme dialect)? Kawa has great Java interoperability, Java-like performance (with the help of optional type declarations), a nice REPL, full documentation, maturity (continuous development since 1996), and many neat features. It doesn't require special tools or workflow. (I do suggest using the git version, as it is overdue for a release.)
- iLemming 8y agoKotlin simply is an attempt to fix Scala problems, which in itself is an attempt to fix Java problems. Clojure by design - simply doesn't have those problems.
- nattmat 8y agoWhat Scala problems does Kotlin attempt to fix?
- iLemming 8y agoLet's not go into the rabbit hole of "Scala has no problems"
- nattmat 8y agoNot my intention. But yours was a bold claim, and I wanted to hear your thoughts. I do not agree with you. Scala is a mostly functional language, and Kotlin is mostly imperative. How is that fixing Scala? They are two different languages, and Kotlin being newer, is inspired by, among others, Scala.
- Elrac 8y agoI don't think that was nattmatt's intention. It sounded like a genuine interested question to me, and I for one would also love to hear someone expound on this topic.
- fulafel 8y agoIt sounds like he is doing Android, where indeed Kotlin is strong, and an officially supported language too.
- bradcypert 8y agoBlog Post Author Here: That's correct! I did not want to give up Clojure or Scala for Android however! I tried writing an app in both and it was miserable, so I went back to Java. And then I thought -- well, hang on, I'm definitely not going to write this in Java if there's a less-verbose alternative. So I forced myself to learn Kotlin and actually like it quite a bit. In a few ways, it reminds me of when I first worked with Groovy.
- bradcypert 8y agoBlog Post Author Here: I write Clojure, Kotlin, and Scala all on a pretty regular basis. Truthfully, I do write less Clojure now than at the time I wrote this post, but that's predominantly because my current interest (and salary) are centered around Kotlin + Android. I still write Clojure quite a far amount, but I don't blog about it as much as I'm not "exploring" the language as much. Sometimes, I'll find or create something cool and share it, but most likely that'll be Kotlin/Android related right now.