https://kotlinlang.org logo
Title
l

LeoColman

03/21/2023, 3:21 PM
I start seeing in many repos that Kotlin file names are starting small letter like
resourceProvider.kt
or
viewExt.kt
. Is it an official convention? I couldn’t find anything in Coding Conventions about it Thread in #codingconventions
l

Landry Norris

03/21/2023, 3:32 PM
Are there classes in these files, or is it just global methods/variables? This could be an interesting way to indicate at a glance that there’s no class in the file.
b

Big Chungus

03/21/2023, 3:37 PM
I personally use lowercase file names when there's no clear owning class inside (e.g. a file with multiple utility classes and top level declarations)
l

Landry Norris

03/21/2023, 3:38 PM
I thought at one point is was recommended that if there’s multiple classes, the file should be named after the first or most important one