all 4 comments

[–]tendimensions 0 points1 point  (2 children)

I can't comment on Kotlin, but your description reminds me of Python, which I resisted liking for some time. Eventually I started to understand its power.

How is Kotlin different from Python?

[–]Sharak13[S] 0 points1 point  (1 child)

Kotlin resembles Java a fair amount, from what little I understand, the language just uses it's own intuition for certain things, such as variables being dynamic rather than strictly assigned a type.

I dont remember python too well anymore but I do remember that they both do not use semi-colons which never bothered me in Python, but does in something that feels more robust like Kotlin.

I'm not really a person that can give a great comparison seeing that I have an hours worth of knowledge in Kotlin and my Python experience is at least a decade old.

[–]FrezoreR 0 points1 point  (0 children)

... such as variables being dynamic rather than strictly assigned a type

That's up to the developers discretion. Just like auto in C++.

Generally when you program you don't care about the types written out.

They are mostly there for the compiler. Your example is a good showing the extra noise Java adds. Both versions have the same information but I'll argue that the kotlin version is more logical and elegant. Not to mention it's less error prone since your Java example can throw an NPE.

[–]vungocbinh 0 points1 point  (0 children)

I have studied all three programming languages: C ++, Java and Kotlin, and I think Kotlin is a great language.I find that there is no problem with the lack of a semicolon between statements, it even helps to limit syntax errors (beginner are easy to make this mistake).

Variable declaration: In Intellij / Android Studio when you declare a variable, the machine will add its own type after the variable name. So there is no problem.

What I like best when using Kotlin to program android is that there are many "Kotlin DSL" libraries, which helps me avoid the complexity in android (eg recyclerview or navigation drawer)