Is there any convention about maximum columns like 80 or 120? I just read Coding Conventions in the Kotlin website, but it says nothing about maximum columns.
s
serebit
12/12/2019, 7:53 PM
I personally hold to 120, but I don't think there's an official convention for it.
➕ 2
c
Casey Brooks
12/12/2019, 7:59 PM
The official Android coding style uses 100 (https://developer.android.com/kotlin/style-guide#line_wrapping), but Kotlin itself imposes no convention. Note that this is the style for Android’s own source code, not necessarily the recommentation for Kotlin Android code at-large, and Google usually has different style guides than what the community typically uses.
I, myself, prefer 120 columns, fwiw
a
Adam Powell
12/12/2019, 11:42 PM
Use whatever lets you comfortably read two files side by side on your laptop screen
h
Hong Minhee
12/13/2019, 6:29 AM
Thank you for answers!
t
Tim McCormack
12/14/2019, 1:30 PM
Adam knows what's up.
You can't feasibly get it down to 80 columns for all of your code, but anything beyond 80 to 100 can make diffs really hard to read.