Oh interesting. How would you translate the snippe...
# codingconventions
e
Oh interesting. How would you translate the snippet above into free-form?
c
That snippet being a completely synthetic example won't make a good primer, I think. Instead look at stdlib docs for better examples. Just to save you some keystrokes and clicks, here's a link to a file with a lot of docs (randomly selected by me) https://github.com/JetBrains/kotlin/blob/master/libraries/stdlib/common/src/kotlin/MathH.kt
e
Real-world example - generating Kotlin classes for proto messages, where each field in the message is translated into a property and has docs
the file you’ve linked contains top-level functions only, which is a different use case
c
Well, the class I shared is a real world example 🙂 As for the specific case you mentioned, I don't think there is any common convention. I tend to agree with your stated opinion about ordering by appearance in code. If Android style guide is an issue, you can reorder the code so that all params come before properties, then your doc would conform both to Android convention and the common sense ordering 🙂
e
haha, yes, I like it 🙂