![]() * Pragmatic macro-like capabilities via inline functions and compiler plugins (removes lots of boilerplate) * Great serialization support (rialization) * Coroutines (looking forward to Java's Loom by then coroutines will have dramatically improved my async code for 5+ years) * Lazy properties (more generally: delegated properties) * Much better DSL capabilities (great for UIs, generating HTML, etc.) * Extension functions (incredibly useful in practice) * Much improved lambdas (e.g., no pain points w/ mutating variables and checked exceptions) ![]() * Type-level distinction between read-only and mutable collections (but compiled to Java collections under the hood, so no conversion required when interacting with Java) * Local variables are final by default ("val") * Much improved type system (nullable types, function types, declaration site variance, type aliases, contracts, better type inference, reified function type arguments) Here are some of my favorite Kotlin improvements over Java that I leverage all the time: Having used Java and Kotlin (mainly targeting JVM) full-time for 6 years, this doesn't match my experience at all. I keep reading on HN that "Kotlin isn't much better than Java X". JDK 17 has most of the good features of Scala and Kotlin. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |