The same was true of minBy(), maxBy(), minWith(), and maxWith(), which all got their *OrNull() synonyms in Kotlin 1.4. It also helped to align the functions’ behavior with naming conventions used throughout the Kotlin collections API. These new names better reflect their behavior – returning null if the receiver collection is empty. In Kotlin 1.4, we renamed the min() and max() collection functions to minOrNull() and maxOrNull(). The return of the min() and max() collection functions
Learn how to write custom generic builders. This means that now you can write your own builders that use builder type inference without applying any additional annotations or options.
With this release, builder inference is automatically activated if a regular type inference cannot get enough information about a type without specifying the -Xenable-builder-inference compiler option, which we introduced in version 1.6.0. It brings us closer to builder inference stabilization and completion of one of the items on our roadmap. Kotlin 1.7.0-Beta includes further changes to builder inference. It helps the compiler infer the type arguments of a call using the type information about other calls inside its lambda argument. Changes to builder inferenceīuilder inference is a special kind of type inference that is useful when calling generic builder functions. Please evaluate Kotlin 1.7.0-Beta and share your feedback with us on YouTrack and Slack (for new Slack members: apply to be invited). We use it to let you know we want you to share feedback with us.
We want the Kotlin builds terminology to be more aligned with the standard terminology of the software release cycle.
There are a few reasons behind this decision: Starting from 1.7.0, we’re updating our cadence terminology by changing “Milestone” to “Beta”.
Install 1.7.0-Beta to try out these features and report any issues you find to help us improve Kotlin 1.7.0.