syntax similar to C / Java / JavaScript / C# • Strong typing (a number is not a string) • Static typing (types of variables are checked at compile time) • Type inference (type declaration can often be omitted) • Object Oriented Programming (classes, objects, methods, inheritance, polymorphic calls) • Functional Programming Paradigm (functions are types, so we can pass them around)
company that builds programming languages IDEs and tools such as IntelliJ IDEA • There is a Kotlin Foundation created with Google to protect the trademarks and to design the development path • Open source licensed under Apache 2 • Kotlin is the name of an island near St. Petersburg (Java is the name of an island, too)
project • 2012: The project becomes Open Source • 2016: First stable release • 2017: Google announces support on Android • 2019: It becomes the preferred language for Android
one that is battle-proven • JS: browser and server (NodeJS) (early stage) • Native: iOS and more (early stage) Be careful: cross platform code cannot use Java libraries!
+…) • It’s concise • It’s interoperable • it can reuse Java libraries ecosystem • it can be used by Java projects • It’s multiplatform (maybe?) • It handles null values in a safer way • Decoupling the evolution of the language from the evolution of the JVM (e.g. phones, AS400, mission critical production servers)
name: String, val nation: String, val operas: List<Opera>) data class Opera(val name: String, val yearOfComposition: Int) fun Database.findFirstComposerByNation(nation: String): Composer? = this.composers.firstOrNull { it.nation == nation } fun Composer.findOperaByYear(year: Int): Opera? = this.operas.firstOrNull { it.yearOfComposition == year } Extending classes from outside