https://kotlinlang.org logo
#feed
Title
b

bruno.aybar

07/17/2018, 3:35 PM
Hi! For the folks getting started with Kotlin, I recently wrote this post about annotations. Feedback is welcome! https://medium.com/@bruno.aybar/annotations-for-your-java-friendly-kotlin-code-badfbedec14
👍 3
m

Mark Gilchrist

07/17/2018, 5:17 PM
I thought it was a very well written article 👍
🙌 1
b

bruno.aybar

07/17/2018, 5:37 PM
Thanks!
i

ianbrandt

07/18/2018, 2:56 AM
Towards the beginning of the article, did you mean to say
object Utils
instead of
object Constants
? E.g.: Let’s say you define a field inside an object / companion object in Kotlin:
Copy code
object Constants {
    val PERMISSIONS = listOf("Internet", "Location")
}
If you try to invoke that function from Java, you would have to write:
Copy code
Utils.INSTANCE.getPERMISSIONS()
b

bruno.aybar

07/18/2018, 4:46 AM
Oh, you're totally right, I'll fix it. Thanks Ian!
👍 1
d

Dennis Cornwell

07/20/2018, 12:27 AM
Really wish I had that article when I was first learning about Kotlin/Java interop. Well done
👍 1
b

bruno.aybar

07/20/2018, 1:18 AM
Thanks Dennis 😄
👍 1
3 Views