Ask HN: Learning Kotlin if you don't know Java
I want to learn Kotlin for Android development. I am a competent self-taught Python programmer. I have found a number of on-line and e-book sources about learning Kotlin, but to paraphrase all of the ones I have found say,"Learning Kotlin is simple for someone who already knows Java". Well here is the thing, I don't know Java! Is it really the case that to learn Kotlin I am going to have to learn Java first?!? Does anyone know a good first book for learning Kotlin from scratch?
8 comments
[ 5.1 ms ] story [ 29.8 ms ] threadMore concretely, what you'll find is that a lot of tutorials and books will likely assume some familiarity with Java. Not necessarily to a point that you can't learn, but more in regards to what they emphasise. For example, they'll likely talk about nullability and Kotlin's approach to it. This makes a lot of sense if you've come from Java but maybe less if you've come from a language that doesn't have nulls.
Having said that, I would expect that, although learning Kotlin should be fine, once you start developing in it, you'll soon find that you'll need to have some familiarity with Java. The reason is that a big selling point of Kotlin is its easy integration with Java. As a consequence, you'll probably find that the libraries you'll want, beyond the basics, won't have been ported to Kotlin. As there's not much call for this.
Unfortunately, I can't recommend a book for non-Java developers as I don't know any Kotlin developers who weren't Java developers first!
Kotlin is a modern language comparable to swift, rust, Scala or ocaml. Learning it is workthile as you’ll learn modern language concepts.
You’ll have to bite the bullet eventually and Kotlin is a nice inroad.