Good reliable language documentation is very important for development, and Kotlin has you covered with resources like language reference, API documentation, online courses, and hands-on tutorials. Today, we are happy to announce the latest addition to our documentation: the Kotlin/Core language specification.
As the name suggests, the specification aims to provide a more detailed description of how Kotlin works than the current language documentation. It will help you gain a deeper understanding of how Kotlin and its features operate, especially if you are a power user, language enthusiast, or compiler writer. The current version of this document aims to specify Kotlin/Core – the platform-independent parts of Kotlin; the platform-specific features will receive their own specifications in due course.
The specification version we’re releasing today is 1.4-rfc+0.3, which means it describes Kotlin 1.4 and is a “request for comments” pre-release with internal version 0.3. The Kotlin team is always open to its community, and the specification is no exception. If you are interested in improving the specification and would like to give us your feedback, we would greatly appreciate it.
The Kotlin/Core language specification not only describes how Kotlin works but also checks whether the compiler implementation is correct, by providing tests that cover the specification statements and linking these tests with the compiler test infrastructure. Our long-term goal is to cover every single point of the document with tests, similar to how it’s done when writing code. You can load the related tests and play around with them in the Web version.
You can find the specification at https://kotlinlang.org/spec, with both Web and PDF versions available. If you’re interested in the specification improvement or would like to contribute, the source code is available at https://github.com/Kotlin/kotlin-spec. The README.md there contains instructions on how you can build the document yourself and send your feedback our way.
Thank you for reading, and we look forward to your comments and feedback on the specification.