20 likes | 43 Views
Language updates include previews of upcoming revisions, platform support and tooling enhancements, and new standard library functions in Kotlin 1.5.30. To know more, visit: www.appsquadz.com/kotlin-app-development
E N D
What's new in Kotlin 1.5.30 Language updates include previews of upcoming revisions, platform support and tooling enhancements, and new standard library functions in Kotlin 1.5.30. Many kotlin app development companies will implement the following key enhancements: Experimental sealed when statements, modifications in the use of opt-in requirement, and other language features Apple silicon is supported natively. The Kotlin/JS IR backend is now in beta. Gradle plugin performance has been improved. Features of the language Previews of future language modifications are included in Kotlin 1.5.30, as well as improvements to the opt-in requirement system and type inference: When it comes to sealed and Boolean issues, it's exhausting. Suspending supertypes as functions Requiring explicit opt-in for experimental API usage Using opt-in requirement annotations with distinct targets has changed. Generic types have been improved. Removing limitations on builder inference Memory Model Preview The concurrency and memory model is one of the most contentious elements of Kotlin/Native. There are several viewpoints on the subject. It is beyond the scope of today's piece to discuss whether this was a good or terrible thing and why. However, individuals must comprehend KMM and KMP for them
to flourish. Nonetheless, it has proven to be a substantial roadblock for some. That is about to change. It wouldn't run the new memory model in production just yet, but you can start playing with it right now and expect production deployments as we get closer to 1.6. You might be wondering what this memory model thing is all about. This can be risky and error-prone. Many languages don't allow you to access state from many threads (JS), and some have built-in memory restriction constraints (Rust). The Kotlin/Native framework provided a novel paradigm. It's intriguing in theory, but it may be perplexing and a barrier to acceptance in practice. The new memory model is expected to allow for unlimited shared state access. Will there be JVM concurrency features (synchronised, etc.) equivalents? Compiling with the frozen model will result in an error if you build a library that requires the new memory model. Code Analysis at Compile Time Because Kotlin Native is a very static language at runtime, any substantial code analysis or modification must be done at compile time. Several libraries can’t be created in the same manner as Android since there isn't a genuine "annotation processor" counterpart. Compiler plugins are required for things like Dagger. True mimicking necessitates code modification. A Kotlin application development company needs a reliable (and adequately documented) compile-time code analysis to make integration easy. The maturity of the plugins, the inclusion of KSP, and the multiplatform IR in 1.5.30 don't switch all of these things on at once. Source Sets/Hierarchical Modules I'd put this in the category of maturing and stabilising tools in general, but the Hierarchical MPP in particular. Many targets with identical dependent APIs can exist, especially in native; however, setting the IDE and compiler to detect them has not been entirely functional. It's worked OK for primary cases like ios(), but publishing HMPP-enabled libraries for libraries with deep hierarchies and multiple targets hasn't been a possibility.