This message was deleted.
# codingconventions
s
This message was deleted.
y
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
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
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
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:
Copy code
val gson = Gson()
or like that:
Copy code
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
@marcinmoskala Gson() is not a constant
m
@Andreas Sinz It is clear, but isn't it a top-level property holding data? I think that this is not clear
a
@marcinmoskala At the beginning it starts with
Names of constants
.
properties that hold data
probably can be confusing
m
OK
y
the Android style guide contains a fairly elaborate definition of what is and isn’t a constant. we might just copy that
2
m
After consideration I think that your argumentation is good and this is why I deleted my suggestion. Although some clarification might be useful.
y
I’ve clarified the text based on the wording in the Android style guide
👍 2