What is the naming convention for boolean returning methods?

在方法前面使用"is"、"has"、"should"、"can"在某些情况下听起来不错,但我不确定.

推荐答案

Kotlin naming style assumes you use the Java naming conventions to the possible extend. I suggest you use this answer to the same question about Java.

更新:他们发布了编码约定 http://kotlinlang.org/docs/reference/coding-conventions.html

Kotlin相关问答推荐

Ktor错误:未指定端口或sslPort

使用数据存储首选项Kotlin Jetpack Compose

"Kotlin中的表达式

Kotlin 函数名后面的大括号是什么意思?

为什么 Kotlin 中没有 init 块的注释

在 Kotlin 中,为什么我们要在闭包中捕获值

修改器的属性是什么,我需要更改以使角变圆且宽度更小?喷气背包组合

jlink:在合并模块和 kotlin.stdlib 中打包 kotlin.*

如何避免键盘打开时jetpack compose 内容上升

循环中的每个元素都应填充行中可用的所有可用空间

如何在 Android 的 Fragment 中使用 setUserVisibleHint

错误:cannot find symbol import com.gourav.news.databinding.ActivityDetailBindingImpl;

`DataBindingUtil` 中的 `bind`、`inflate` 和 `setContentView` 有什么区别

从片段(fragment)中的点击事件启动协同程序

使用范围的稀疏sparse值列表

Kotlin reflect proguard SmallSortedMap

从命令行运行Java到Kotlin转换器?

kotlin 委托有什么用?

使用 rxbinding 时我应该取消订阅吗?

带有注释为@RegisterExtension的字段的 JUnit 5 测试在 Kotlin 中不起作用