Effective Kotlin: Best practices
Kt. Academy - 444 頁
Kotlin is a powerful and pragmatic language, but it's not enough to know about its features. We also need to know when they should be used and in what way. This book is a guide for Kotlin developers on how to become excellent Kotlin developers. It presents and explains in-depth the best practices for Kotlin development. Each item is presented as a clear rule of thumb, supported by detailed explanations and practical examples.
abstraction algorithms Android annotation behavior better Boolean builder pattern Chapter collection processing common companion object compiled contract create data class default define elements equals error example expect extension functions extract factory functions filter FizzBuzz fun main function types hash hash table hashCode immutable objects implementation important inheritance inline classes inline fun inline functions instance interface Item Iterable Java Joshua Bloch KDoc Kotlin developers Kotlin/JVM lambda expression languages lateinit lazy Limit mutability memory leak method millis module Moskała mutable objects name1 named arguments nullable object creation operator fun optimization override fun prefer primary constructor print(3 private val private var problem programming property delegation read-only readability return null return type reuse sequence specify standard library String subclasses subtype superclass top-level functions type parameter unit tests usage val list val name val surname variable variance modifiers visibility