Kotlin update previews experimental features

Kotlin 1.5.30, just published by JetBrains, offers experimental new language features and experimental additions to the standard library. The experimental features include sealed when statements and instantiation of annotation classes, which could become official in the upcoming Kotlin 1.6.0 release.Sealed when statements, if enabled, introduce a compiler warning if a when statement is not exhaustive. This is intended to make code safer without developers needing to introduce their own functions. [ Also on InfoWorld: What to expect in Java 18 ] Also being previewed is support for suspend functions as supertypes, enabling the use of suspend functional types as super interfaces, although there are limitations, such as developers not being able to use multiple suspend functional supertypes. This has been considered a missing piece in Kotlin coroutines design.To read this article in full, please click here

Nov 30, -0001 - 00:00
 0
Kotlin update previews experimental features
Techatty All-in-1 Publishing
Techatty All-in-1 Publishing

Kotlin 1.5.30, just published by JetBrains, offers experimental new language features and experimental additions to the standard library. The experimental features include sealed when statements and instantiation of annotation classes, which could become official in the upcoming Kotlin 1.6.0 release.

Sealed when statements, if enabled, introduce a compiler warning if a when statement is not exhaustive. This is intended to make code safer without developers needing to introduce their own functions.

Also being previewed is support for suspend functions as supertypes, enabling the use of suspend functional types as super interfaces, although there are limitations, such as developers not being able to use multiple suspend functional supertypes. This has been considered a missing piece in Kotlin coroutines design.

To read this article in full, please click here

Talk to Techatty
Talk to Techatty
Techatty Connecting the world of tech differently! Read. Write. Learn. Thrive. Make an informed decision without distractions. We are building tech media and publication networks to connect YOU and everyone to reliable information, opportunities, and resources to achieve greater success.