https://kotlinlang.org logo
Title
s

Slackbot

11/21/2017, 1:58 PM
This message was deleted.
y

yole

11/21/2017, 2:18 PM
this is an endless argument, and I’m not going to begin another round of it. suffice to say, Google’s Android style guide also has the same convention, and I’m not going to either contradict them or try to convince them to change their style guide
m

marcinmoskala

11/21/2017, 2:24 PM
This is why I would just avoid making any statements about it and I woild let developers do it how they want. Note that Kotlin/Native is opening Kotlin to lot's of new environments and platforms (Python, R etc) and they will not be happy if developers will be forced to change their naming habits.
y

yole

11/21/2017, 2:25 PM
following that logic we might as well give up on the style guide altogether. and the community has clearly stated that one is needed.
m

marcinmoskala

11/21/2017, 2:59 PM
It is not a point. Conventions are needed but not just for making conventions. They are needed when there is some purpose behind them. I feel that this rule is not improving anything. Stating that something is constant says nearly nothing - most properties in Kotlin are read-only.
Let's say I want to specify read only property with Gson. Do you want me to do it like that:
val gson = Gson()
or like that:
val GSON = Gson()
?
I would strongly prefer first option and I am pretty sure that this is how Gson was defined in KotlinConf-app
a

Andreas Sinz

11/21/2017, 3:06 PM
@marcinmoskala Gson() is not a constant
m

marcinmoskala

11/21/2017, 3:48 PM
@Andreas Sinz It is clear, but isn't it a top-level property holding data? I think that this is not clear
a

Andreas Sinz

11/21/2017, 10:07 PM
@marcinmoskala At the beginning it starts with
Names of constants
.
properties that hold data
probably can be confusing
m

marcinmoskala

11/22/2017, 6:15 AM
OK
y

yole

11/22/2017, 8:32 AM
the Android style guide contains a fairly elaborate definition of what is and isn’t a constant. we might just copy that
2
m

marcinmoskala

11/22/2017, 3:11 PM
After consideration I think that your argumentation is good and this is why I deleted my suggestion. Although some clarification might be useful.
y

yole

11/27/2017, 3:14 PM
I’ve clarified the text based on the wording in the Android style guide
👍 2