The Kotlin Programming Language
Kotlin is a programing language created by JetBrains, the company who develops one of the best IDEs of the world. With Google adopting the language as a new official language for Android development, and many others jumping on the Kotlin train, let's see together why we have here a language well worth the attention of any serious developer
Kotlin is a computer programing language first appeared on the scene 12 years ago (2011). It is a multi-paradigm, statically typed (with extended type inference), object-oriented (class-based), structured, imperative, generic, reflective, concurrent, functional and procedural programming language with automatic memory management whose main purposes are:
- propose itself as a successor to Java introducing to developers a new, better and more productive language which is 100% compatible with Java but offers more type-safe constructs and allows more concise sources and expressive code also allowing the creation and inclusion in source codes of DSL sources;
- Windows (x86_64 only)
- Linux (x86_64, arm32, MIPS, MIPS little endian)
- MacOS (x86_64)
- iOS (arm64 only)
- Android (arm32 and arm64)
- WebAssembly (wasm32 only)
First glance at the code
Example: The classic "Hello world" program written in Kotlin:
Main features of Kotlin
Statically typed (with extended type inference)
From a programmer point of view in Kotlin everything is an object. In fact internally some of the types can have a special representation like numbers, characters and booleans. Kotlin basic types are: numbers, characters, booleans, arrays, and strings.
|Char||Characters cannot be treated as numbers|
|String||Strings are immutable. Elements of a string are characters|
Kotlin is object-oriented. It supports common object-oriented patterns like interfaces, classes and also supports generics. Multiple inheritance is not allowed, but the language has delegates.
Kotlin offers complete support, libraries and language costructs to allow the concurrent execution of multiple threads within the same application.
Free and open source
Kotlin is free and open source software licensed under the Apache 2 License.
Best books for learning Kotlin
|Programmer's Guide To Kotlin|
No need to be an expert in Java or any other languageWhile Kotlin is similar to Java, and you can pick up much of the language as you go along, a deeper understanding will enable you to create better and more robust programs. As with all languages there are some... (continue on Amazon)
For experienced programmers
|Kotlin in Action|
By Kotlin team members Dmitry Jemerov and Svetlana IsakovaWritten for experienced Java developers, this example-rich book goes further than most language books, covering interesting topics like building DSLs with natural language syntax. The authors are core Kotlin developers, so you can... (continue on Amazon)
If you like and feel comfortable with Kotlin's syntax you should jump on Kotlin and leaving Java right now. Seriously. Kotlin is exactly, from a features point of view, what every Java programmer has ever dreamt about. On the other side, if you still feel way more comfortable with the Java syntax, your search surely won't end with Kotlin. Many many many times it really seems that when someone wants to create a new language extending an old one the fevre to alter even what was already perfect plays a really big role. This is really a big pity.