https://kotlinlang.org logo
#codingconventions
Title
# codingconventions
s

sreich

09/12/2022, 6:46 PM
i've noticed the
isEnabled
convention in java land. i am assuming in kotlin it would just be
enabled
, am i correct in this? i can't remember the justification people had for doing that in java, sth to do with properties?
e

ephemient

09/12/2022, 6:51 PM
no
Kotlin
var foo: T
= Java `T getFoo()`/`setFoo(T)` Kotlin
var isFoo: Boolean
= Java `boolean isFoo()`/`setFoo(boolean)` following JavaBeans naming conventions
s

sreich

09/12/2022, 6:56 PM
hm, thx
8 Views