Kotlin support on Android:
i never liked Java, not because of the language but for the usual bad design implementations and Android is one of those.
Then Kotlin arrived, it looked very promising but it's when i looked at Coroutines that it simply blew my mind:
you just have to write your code and the Kotlin's compliler "magic" will do most of the boring/complex stuff for you and it's even great performance wise!
I even refactored inter-process calls to simple sync functions with few like of code and for a non-android developer like me it's just love at first sight!

  • 3
    Just so you know, its not fast at all
  • 4
    @sharktits i'm talking about Coroutines:

    they use the Kotlin compiler to "split" the code and create an "iterative-like" code instead of using threads or Activities and they're presented as a faster and transparent alternative for threads/callbacks
  • 1
    @plokko depends on where you tell the coroutine to run though. Idk if by default that's the behavior, but it sure is nice.

    Game engines have been doing this for ages, it's good to see this on Android. Fuck callOnUiThread()

    Also your reaction to kotlin is all my teams' reaction, no more for loops with conditions inside them

    no more x!=null && x.y!=null && x.y.z!=null && x.y.z

    just x.?y.?z ... ahhh

    no more @override everywhere, setters and getters, and ton of boilerplate crap

    And EXTENTIONS !!!

    Yeah it's really satisfying. But we still aren't using coroutines, I thought they recommended not to for the time being?
Your Job Suck?
Get a Better Job
Add Comment