Do all the things like ++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatarSign Up
>where did you learn to write efficient kotlin code and how?
- paying attention to what the IDE tells me: (use "apply", use a lambda expression, etc)
- code reviews. Usually my tech lead comes up with fabulous code sugar and I'm fascinated how to use this on my own code
- Usually just Googling "how to write ..." in Kotlin. I would be taken to many Medium blogs telling me how to write this particular expression and why.
- paying attention to how to write higher order functions and coroutines in Kotlin.
@jennytengsonM I must say that's a... peculiar way of learning a new language. We are so much dependent on learning from the translators, its like if you wanna learn spanish , then google translate every phrase you know. that's not how it should be done, but most of the people i know are really using the same way to learn as you described.
I might have not learned many languages, but I learned c++ and java by just doing RTFM for basic stuff, oops,i/o , maybe pointers and behold, i know 2 languages.
But kotlin is too weird , don't you think? constructor in class name or constructor via constructor keyword,same symbol for extending or implementing, MainActivity::class.java.whatev ,... it really makes you question your concepts :/
But thanks for the reply. I was actually doing the same until now, maybe i will continue doing so and one day call myself a "kotlin android dev"