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 8 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.
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.