
So, for example, in Kotlin, a variable of type String can never be null, but a variable of type String? (note ? suffix) can. The Kotlin type system distinguishes between references that can hold null values (nullable references) and those that can't, and the compiler will verify consistent usage of variables of each type. More than any other language I have used, Kotlin greatly reduces occurrences of the dreaded NullPointerException. The Kotlin Blog has a comprehensive summary of this release, and any issues discovered during testing can be reported on YouTrack.One of the major design goals of Kotlin was to eliminate, or at least greatly reduce problems associated with null references. In an upcoming update, this solution will be the default option, and it can be evaluated by following the migration instructions. The new memory manager simplifies the developer experience when developing cross-platform applications for platforms such as Android and iOS by eliminating distinctions between the JVM and Native platforms.


The latest Kotlin/Native Memory manager, which improves performance and developer experience, is now available as an Alpha release. The following statement prints The Fellowship of the Ring Val movie = "The Fellowship of the Ring:2001" The min(), max(), minBy(), maxBy(), minWidth(), and maxWith() functions have been brought back in this release, and they now return the collection element or throw an exception:

The re-introduction of min(), max(), minBy(), maxBy(), minWidth(), and maxWith() You can configure the build scripts from the Early Access Preview to use these new features in version 1.7.0-Beta. In Kotlin/JS and Kotlin/Native, regular expressions now support named capturing groups and can check for exact matches at specific positions.īeginning with version 1.7.0, "Milestone" releases are now referred to as "Beta" releases to align with standard software release life cycle terminology, where "Beta" means that no new features are added and the focus is on strengthening the functionalities with the support of community input. JetBrains has published Kotlin 1.7.0-Beta, which includes the reintroduction of the min(), max(), minBy(), maxBy(), minWidth(), and maxWith() functions and enables builder inference and definitely non-nullable types by default.
