Kotlin 언어 기능과 제안

Kotlin 언어 기능과 제안

JetBrains는 실용적인 설계에 따라 Kotlin 언어 진화 원칙에 맞춰 Kotlin 언어를 진화시키고 있어요.

언어 기능 제안은 Kotlin 1.7.0부터 나열되어 있어요.

언어 기능 상태에 대한 설명은 Kotlin 진화 원칙 문서에서 확인할 수 있어요.

출처: Kotlin language features and proposals

본문

탐색 및 설계(Exploration and design)

Support immutability

KEEP 논의

CoroutineContext as context parameter

Rich Errors: motivation and rationale

Kotlin companion blocks and extensions (statics)

Version overloading

미리보기(In preview)

Collection literals

Improve compile-time constants

Name-based destructuring

Unused return value checker

Context-sensitive resolution

Expose boxed inline value classes in JVM

Common Atomics and Atomic Arrays

KMP Kotlin-to-Java direct actualization

안정(Stable)

Context parameters: support for context-dependent declarations

Improvements to annotation use-site targets on properties

Explicit backing fields

Uuid

  • KEEP 제안: uuid.md
  • YouTrack 이슈: KT-31880
  • 사용 가능: 2.0.20부터, Stable since 2.4.0

Data flow-based exhaustiveness checking

Nested (non-capturing) type aliases

kotlin.time.Instant

Guard conditions in when-with-subject

Multidollar interpolation: improved handling of $ in string literals

Non-local break and continue

Stabilized @SubclassOptInRequired

Enum.entries: performant replacement of the Enum.values()

Data objects

RangeUntil operator ..<

Definitely non-nullable types

철회됨(Revoked)

Context receivers

Java synthetic property references