That was awesome, although i am not a java developer, i am going to give Kotlin a try.
I used to code in Java for a couple years and really never had any love for it. I did find JavaScript to be much more fun for me, although it is lacking in many aspects as a robust language. Python was something that really had my attention but still to me was not complete when comparing to Java. Kotlin really caught my eye and actually got me back into the Java realm.
Great article about some of the many questions I have been looking up answers for.
"Smart casting in Kotlin" is biased. In Java there's no need to cast objects to Password nor to Username since getValue method is declared in the base class. In order to improve the example, some methods specific to Password and Username should be added.
Can you "invent" some method for Username as well?
Interesting. Reminds me of some of the similar reasons Groovy was created.
Have you tried Swift 3? It also has elegant syntax. 1st time I'm hearing about Kotlin... What is it used for and why was it invented? How easy is it to get started and build 1st business production app without installing over 9000 packages or VMs? Java sucks, it's true.
Finally! Kudos for the effort and time to compile this HNO.
I'm currently looking into Kotlin and my plan to ditch Java is getting delayed. But with more and more I read about Kotlin, I grow more and more into it. As I mentioned before, it wouldn't be long before I left Java for Kotlin, and thanks for putting out all information which I needed.
The most interesting thing is, how quick I can write the same code in Kotlin with far more less code. And this is what I was looking for. Another good thing is, it is coming under JVM family IIRC!
Once again, thank you for writing this, so that people like me, who thought Java was the end of the world can get more idea about this Insane language!
Rajkumar
Fullstack Developer.
adeeb
https://ReactDOM.com
Interesting! Java has long been a classic but great to see such a great comparision!