This thread should be used to ask Kotlin related queries, be it a general query, related to a particular topic or any code in which you need any help or guidance.
Kotlin syntax is not similar to Java, it is actually similar to Scala. But compared to Java it is less verbose, which reduces the effort on the developer. Plus it interoperates with Java classes, so you can use Java libraries with it as well.
Not very difficult, but you have to use it to get a feel for it.
Google has announced first class support for Kotlin, especially since the Oracle lawsuit. So, I see that it will be more common for Android apps (Arogya Setu app is written in Kotlin for example). But it is also good as a general purpose replacement for Java. Whether it gets more popular than Java that remains to be seen.
I am still not convinced about the verbose part. It seems like several steps are combined in a single step where as each line in java has a distinct purpose. and then its becomes easy to give one look and know what the program is going to do. I am obviously biased and so much used to Java that I found Kotlin shortcuts bit more difficult to remember.
I see.
Nice. I didn't know this.
TBH at this moment, you will need to have some understanding of Java to effectively work with Kotlin. Technically you can still write verbose code with Kotlin if you wish for the original Java experience, but as you learn the shortcuts, you will find that coding in Kotlin is faster since you don't have to think about constructors, getters, setters, etc.
The best feature of Kotlin I think is that it reduces the verbosity of Java. The syntax is kinda different as well, but you can get used to it is as you write code. I personally find it much easier to write in Kotlin than Java because of the reduction of effort.
Java is fucking verbose, i hate a lot.. but its my goto language to use in coding interviews if i need complex data structures like hashmap. Kotlin usage isnt very widespread but you make it sound useful if it can use java classes natively.. Maybe I should try it
or go with Kotlin. Sigh ...
No one can answer that but you. I only learn new language when I need to, or my job demands me to. My primary work language is objective c but soon, I'll have to learn swift
Waste of time and energy
Note that Kotlin is still not very common in the enterprise software development domain. That is why I always suggest learning Java and learn Kotlin as a side gig. But you can't go wrong with pure Kotlin if you are going into Android app development.
Spring has been officially supporting Kotlin since Spring 5 I think. You have the choice of either creating a Java or Kotlin project at start.spring.io.
Most of the differences are discussed in above posts. The goal of the Kotlin team was to create a language that has flexibility like Java but simplify it by removing boilerplate code and introducing features that make it more concise. Currently, Kotlin requires Java to run, so it's kind of like coding in Scala or Clojure (which also require Java), but since Java is the language with the largest number of libraries, you can use those libraries in your Kotlin, Scala or Clojure projects.