211

For those who wanted to know the difference.

Comments
  • 2
  • 1
  • 2
    Nice chicken!
  • 5
    True that! But Kotlin is also safe at the same time. 😉
  • 1
  • 1
    Kotlin >>>>>>>>>>>>>>>>>>>>>
  • 1
    Hahaha yes
  • 2
    Holy shit! Niw that's what I call a "rubber duck"! Careful what crappy code you show it 😁
  • 4
    @brano88 null safe. And also safe for your mental sanity, thanks to:
    - null safety (as mentioned) (i.e. stronger type system than Java)
    - type inference
    - superior generics
    - no setters and getters, unless custom
    - data classes
    - extension properties and functions
    - simpler immutable properties, fields and collections
    - functional programming amidst object-oriented code and vice versa
    - much nicer and more concise syntax
    - ultra lightweight multi-threading (I've seen a demo with 100000 Kotlin coroutines run in a second, while the same in Java runs out of memory)
    - sealed classes (enums on steroids)
    - great utilities in the standard library, code blocks: let / run / apply / also / use etc.

    To name a few.

    Things only get complicated when you mix Kotlin and Java. Where they interoperate you really miss all the Kotlin goodness and sometimes you have to introduce ugly Java constructs because... Java.
  • 0
    @brano88 of course everything in Kotlin is possible with Java; it's all the same byte code after all. However, you really don't want to repeat yourself, nor is it necessary, to create all kinds of boilerplate constructs, patterns and architecture while Kotlin has all that.
  • 1
    Kotlin is amazing
  • 0
    @eeee I just wanna say something about coroutines.
    People tend to confuse coroutines with multithreading because both are asynchronous paradigms while in reality they are different approaches to the same problem. They are not a new concept (coined by Knuth the in the late 50s).

    Read more about coroutines here https://en.m.wikipedia.org/wiki/...
Add Comment