PLDB
Languages Features Calendar CSV Lists Blog About Sponsor Add Language
GitHub icon

Kotlin

Kotlin

Kotlin is a pl created in 2011 by Andrey Breslav.

#35on PLDB 11Years Old 70.1kUsers
99Books 16Papers 901kRepos

Try now: Riju · TIO · Replit

Kotlin is a statically-typed programming language that runs on the Java virtual machine and also can be compiled to JavaScript source code or use the LLVM compiler infrastructure. Its primary development is from a team of JetBrains programmers based in Saint Petersburg, Russia. While the syntax is not compatible with Java, Kotlin is designed to interoperate with Java code and is reliant on Java code from the existing Java Class Library, such as the collections framework. Read more on Wikipedia...


Example from Compiler Explorer:
// Type your code here, or load an example. fun square(num: Int): Int = num * num
Example from Riju:
println("Hello, world!")
Example from hello-world:
fun main() { println("Hello World") }
Example from the Hello World Collection:
// Hello world in Kotlin fun main(args : Array<String>) { println("Hello, world!") }
Example from Linguist:
package addressbook class Contact( val name : String, val emails : List<EmailAddress>, val addresses : List<PostalAddress>, val phonenums : List<PhoneNumber> ) class EmailAddress( val user : String, val host : String ) class PostalAddress( val streetAddress : String, val city : String, val zip : String, val state : USState?, val country : Country ) { assert {(state == null) xor (country == Countries["US"]) } } class PhoneNumber( val country : Country, val areaCode : Int, val number : Long ) object Countries { fun get(id : CountryID) : Country = countryTable[id] private var table : Map<String, Country>? = null private val countryTable : Map<String, Country> get() { if (table == null) { table = HashMap() for (line in TextFile("countries.txt").lines(stripWhiteSpace = true)) { table[line] = Country(line) } } return table } } class Country(val name : String)
Example from Wikipedia:
// returns null if... // - foo() returns null, // - or if foo() is non-null, but bar() returns null, // - or if foo() and bar() are non-null, but baz() returns null. // vice versa, return value is non-null if and only if foo(), bar() and baz() are non-null foo()?.bar()?.baz()

Keywords in Kotlin

as as? break class continue do else false for fun if in !in interface is !is null object package return super this throw true try typealias val var when while by catch constructor delegate dynamic field file finally get import init param property receiver set setparam where actual abstract annotation companion const crossinline data enum expect external final infix inline inner internal lateinit noinline open operator out override private protected public reified sealed suspend tailrec vararg field it + - * / % * = += -= *= /= %= ++ -- && || ! == != === !== < > <= >= [ ] !! ?. ?: :: .. : ? ->; @ ; $ _

Language features

Feature Supported Example Token
Conditionals
Access Modifiers
Functions
Exceptions
Constants
Classes
While Loops
Booleans true false
Strings "
MultiLine Comments
/* A comment
*/
/* */
Print() Debugging println
Line Comments
// A comment
//
Operator Overloading
Interfaces
interface Named {
   val name: String
}
interface Person : Named {
    val firstName: String
    val lastName: String
    
    override val name: String get() = "$firstName $lastName"
}
File Imports
import foo.Bar // Bar is now accessible without qualification
import foo.* // everything in 'foo' becomes accessible
import bar.Bar as bBar // bBar stands for 'bar.Bar'
Comments
Semantic Indentation ϴ
Macros ϴ

Books about Kotlin on goodreads

title author year reviews ratings rating
Kotlin for Android Developers: Learn Kotlin the easy way while developing an Android App Antonio Leiva 17 117 3.81
Programming Kotlin Stephen Samuel 4 27 3.96
Kotlin Apprentice: Beginning Programming with Kotlin raywenderlich.com Team 0 0 0.0
Reactive Programming in Kotlin: Design and build non-blocking, asynchronous Kotlin applications with RXKotlin, Reactor-Kotlin, Android, and Spring Rivu Chakraborty 2 14 3.93
Programming Kotlin Venkat Subramaniam 0 1 5.00
Kotlin Programming: The Big Nerd Ranch Guide Matthew Mathias 0 0 0.0

Books about Kotlin from ISBNdb

title authors year publisher
Reactive Programming with Kotlin (First Edition): Learn Rx with RxJava, RxKotlin, and RXAndroid Tutorial Team, raywenderlich and Sullivan, Alex 2019 Razeware LLC
Mastering Kotlin: Learn advanced Kotlin programming techniques to build apps for Android, iOS, and the web Ebel, Nate 2019 Packt Publishing
Hands-On Serverless Applications with Kotlin: Develop scalable and cost-effective web applications using AWS Lambda and Kotlin Trivedi, Hardik and Kulkarni, Ameya 2018 Packt Publishing
Android Development with Kotlin: Enhance your skills for Android development using Kotlin Moskala, Marcin and Wojda, Igor 2017 Packt Publishing
Kotlin Blueprints: A practical guide to building industry-grade web, mobile, and desktop applications in Kotlin using frameworks such as Spring Boot and Node.js Belagali, Ashish and Trivedi, Hardik and Chordiya, Akshay 2017 Packt Publishing
Kotlin Programming: The Big Nerd Ranch Guide Skeen, Josh and Greenhalgh, David 2018-06-25T00:00:01Z Big Nerd Ranch Guides
Android Studio 4.0 Development Essentials - Kotlin Edition: Developing Android Apps Using Android Studio 4.0, Kotlin and Android Jetpack Smyth, Neil 2020 Payload Media
Android Programming with Kotlin for Beginners: Build Android apps starting from zero programming experience with the new Kotlin programming language Horton, John 2019 Packt Publishing
Kotlin In-Depth: A Guide to a Multipurpose Programming Language for Server-Side, Front-End, Android, and Multiplatform Mobile (English Edition) Sedunov, Aleksei 2022 BPB Publications
Android Studio 4.2 Development Essentials - Kotlin Edition: Developing Android Apps Using Android Studio 4.2, Kotlin and Android Jetpack Smyth, Neil 2021 Payload Media
Kotlin Apprentice (Second Edition): Beginning Programming with Kotlin Tutorial Team, raywenderlich and Galata, Irina and Shapiro, Ellen and Howard, Joe 2019-10-01T00:00:01Z Razeware LLC
Android Programming with Kotlin for Beginners: Build Android apps starting from zero programming experience with the new Kotlin programming language Horton, John 2019-04-30T00:00:01Z Packt Publishing
Mastering Kotlin: Learn advanced Kotlin programming techniques to build apps for Android, iOS, and the web Ebel, Nate 2019 Packt Publishing
Kotlin Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) Greenhalgh, David and Skeen, Josh 2021 Big Nerd Ranch Guides
Functional Programming in Kotlin Vermeulen, Marco and Bjarnason , Rúnar and Chiusano , Paul 2021 Manning
Kotlin in Action Jemerov, Dmitry and Isakova, Svetlana 2017 Manning
Programming DSLs in Kotlin Subramaniam, Venkat 2021 Pragmatic Bookshelf
Kotlin Apprentice (Third Edition): Beginning Programming with Kotlin Tutorial Team, raywenderlich and Galata, Irina and Gonda, Victoria and Howard, Joe and Shapiro, Ellen 2021 Razeware LLC
Android Studio Arctic Fox Essentials - Kotlin Edition: Developing Android Apps Using Android Studio 2020.31 and Kotlin Smyth, Neil 2021 Payload Media, Inc.
Kotlin Programming: The Big Nerd Ranch Guide (Big Nerd Ranch Guides) Greenhalgh, David and Skeen, Josh 2021 Big Nerd Ranch Guides
Kotlin for Android App Development (Developer's Library) Sommerhoff, Peter 2018 Addison-Wesley Professional
Functional Programming in Kotlin Vermeulen, Marco and Bjarnason, Rúnar and Chiusano, Paul 2021 Manning Publications
Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming Späth, Peter 2019 Apress
Learn Kotlin Programming: A comprehensive guide to OOP, functions, concurrency, and coroutines in Kotlin 1.3, 2nd Edition Samuel, Stephen and Bocutiu, Stefan 2019 Packt Publishing
Learn Kotlin for Android Development: The Next Generation Language for Modern Android Apps Programming Späth, Peter 2019-05-30T00:00:01Z Apress
Programming Kotlin Applications: Building Mobile and Server-Side Applications with Kotlin McLaughlin, Brett 2021 Wiley
Functional Programming in Kotlin by Tutorials (First Edition): A Practical Approach to Writing Safer, More Reliable Apps Tutorial Team, raywenderlich and Carli, Massimo 2022 Razeware LLC
Android Studio 3.6 Development Essentials - Kotlin Edition: Developing Android 10 (Q) Apps Using Android Studio 3.6, Kotlin and Android Jetpack Smyth, Neil 2020 Payload Media
Kotlin Apprentice: Beginning Programming with Kotlin raywenderlich.com Team and Galata, Irina and Howard, Joe and Lucas, Dick and Shapiro, Ellen 2018 Razeware LLC
Android Studio 3.2 Development Essentials - Kotlin Edition: Developing Android 9 Apps Using Android Studio 3.2, Kotlin and Android Jetpack Smyth, Neil 2018 Payload Media, Inc.
Kotlin Programming By Example: Build real-world Android and web applications the Kotlin way Adelekan, Iyanu 2018 Packt Publishing
Reactive Programming in Kotlin: Design and build non-blocking, asynchronous Kotlin applications with RXKotlin, Reactor-Kotlin, Android, and Spring Chakraborty, Rivu 2017-12-05T00:00:01Z Packt Publishing
Mastering High Performance with Kotlin: Overcome performance difficulties in Kotlin with a range of exciting techniques and solutions Kucherenko, Igor 2018 Packt Publishing
The First Line of Code: Android Programming with Kotlin Guo, Lin 2022 Springer
Kotlin Standard Library Cookbook: Master the powerful Kotlin standard library through practical code examples Urbanowicz, Samuel 2018 Packt Publishing
Kotlin Programming Cookbook: Explore more than 100 recipes that show how to build robust mobile and web applications with Kotlin, Spring Boot, and Android Roy, Aanand Shekhar and Karanpuria, Rashi 2018 Packt Publishing
Reactive Programming with Kotlin (Second Edition): Learn RX with RxJava, RxKotlin and RxAndroid Tutorial Team, raywenderlich and Sullivan, Alex 2021 Razeware LLC
Easy Minecraft® Mod Programming: Learn to Code Minecraft® Mods with Kotlin Norman, Michael D. and Norman, Isaac S. 2018 CreateSpace Independent Publishing Platform
Kotlin In-Depth [Vol-I]: A Comprehensive Guide to Modern Multi-Paradigm Language (English Edition) Sedunov, Aleksei 2020 BPB Publications
Hands-On Object-Oriented Programming with Kotlin: Build robust software with reusable code using OOP principles and design patterns in Kotlin Khan, Abid and Kucherenko, Igor 2018-10-31T00:00:01Z Packt Publishing
Kotlin Quick Start Guide: Core features to get you ready for developing applications Devcic, Marko 2018 Packt Publishing
Kotlin Programming Journal: Notebook For Kotlin Programming: Blank Ruled Notebook / Lined Journal Gift For Kotlin Programmers, 120 pages, 6x9 inches, Matte. Publishing, Dascity 2019-12-20T00:00:01Z Independently published
Kotlin At a Glance Saxena, Swati 2019 BPB Publications
Fundamental Kotlin Miloš Vasić 2016
Beginners Guide To Kotlin Programming John Hunt 2021 Springer International Publishing AG
Hands-on Reactive Programming With Kotlin Abid. Roy Khan (aanand Shekhar. Iglesias, Juan Antonio Medina.) 2019
Kotlin Programming Josh Skeen; David Greenhalgh 20180809 Pearson Technology Group
Kotlin Cookbook Ken Kousen 20191114 O'Reilly Media, Inc.
Functional Kotlin Mario Arias; Rivu Chakraborty 23-02-2018 Packt Publishing
Kotlin Programming Bruce Herbert 2019 Independently Published
Programming Kotlin Venkat Subramaniam 20190912 O'Reilly Media, Inc.
Kotlin For Beginners Peter Sommerhoff
Head First Kotlin Dawn Griffiths and David Griffiths 2019 O'reilly Media
Programming Kotlin Applications Brett McLaughlin 2020 John Wiley & Sons
Head First Kotlin Dawn Griffiths; David Griffiths 20190213 O'Reilly Media, Inc.
Learn Kotlin Programming Stephen Samuel; Stefan Bocutiu 29-05-2019 Packt Publishing
Kotlin Programming Cookbook Aanand Shekhar Roy; Rashi Karanpuria 25-01-2018 Packt Publishing
Java to Kotlin Duncan McGregor; Nat Pryce 20210816 O'Reilly Media, Inc.
Programming Kotlin Applications Brett McLaughlin 20201209 Wiley Professional Development (P&T)
Programming DSLs in Kotlin Venkat Subramaniam 20210323 O'Reilly Media, Inc.
Kotlin Programming By Example Iyanu Adelekan 28-03-2018 Packt Publishing
Reactive Programming in Kotlin Rivu Chakraborty 43074 Packt Publishing
Kotlin Standard Library Cookbook Samuel Urbanowicz 30-07-2018 Packt Publishing
Programming Android with Kotlin Pierre-Olivier Laurence; Amanda Hinchman-Dominguez; G. Blake Meike; Mike Dunn 20211206 O'Reilly Media, Inc.
The Joy of Kotlin Pierre-Yves Saumont 20190421 Simon & Schuster
Kotlin Basics: The Ultimate Beginner's Guide To Learn Kotlin Programming Step By Step Moaml Mohmmed 2019-08-16 Independently Published
Beginner's Guide to Kotlin Programming John Hunt 20211008 Springer Nature
Learn to Program with Kotlin Tim Lavers 20210518 Springer Nature
Mastering Android Development with Kotlin Milos Vasic 43047 Packt Publishing
Hands-On Microservices with Kotlin Juan Antonio Medina Iglesias 29-01-2018 Packt Publishing
Learn Android Studio 3 with Kotlin Ted Hagos 20181112 Springer Nature
Kotlin Design Patterns and Best Practices Alexey Soshin; Anton Arhipov 21-01-2022 Packt Publishing
Android Studio Bumble Bee Essentials - Kotlin Edition Neil Smyth 2022-02-18 Payload Media, Inc.
Hands-On Design Patterns with Kotlin Alexey Soshin 15-06-2018 Packt Publishing
Kotlin and Android Development featuring Jetpack Michael Fazio 20210615 O'Reilly Media, Inc.
Learning Kotlin by building Android Applications Eunice Obugyei; Natarajan Raman 20180625 Packt Publishing
Hands-On Serverless Applications with Kotlin Hardik Trivedi; Ameya Kulkarni 29-09-2018 Packt Publishing
Android Studio 4.1 Development Essentials - Kotlin Edition Neil Smyth 2020-12-08 Payload Media, Inc.
Android Studio 3.6 Development Essentials - Kotlin Edition Neil Smyth 2020-04-30 Packt Publishing
Android Studio 4.0 Development Essentials - Kotlin Edition Neil Smyth 2020 Packt Publishing
Android Studio 3.6 Development Essentials - Kotlin Edition Neil Smyth 2020-04-01 Payload Media, Inc.
Android Studio 3.5 Development Essentials - Kotlin Edition Neil Smyth 2019-05-17 Packt Publishing
Android Studio 4.2 Development Essentials - Kotlin Edition Neil Smyth 2021-08-10 Packt Publishing
Simplifying Application Development with Kotlin Multiplatform Mobile Róbert Nagy 44624 Packt Publishing
Hands-On Object-Oriented Programming with Kotlin Abid Khan; Igor Kucherenko 31-10-2018 Packt Publishing
Kotlin for Enterprise Applications using Java EE Raghavendra Rao K 30-11-2018 Packt Publishing
Android Studio Arctic Fox Essentials - Kotlin Edition Neil Smyth 2021-10-18 Packt Publishing
Building Applications with Spring 5 and Kotlin Milos Vasic 18-05-2018 Packt Publishing
Android Studio 4. 0 Development Essentials - Kotlin Edition Neil Smyth 2020
Android Studio 3. 6 Development Essentials - Kotlin Edition Neil Smyth 2020 Packt Publishing, Limited
Kickstart Modern Android Development with Jetpack and Kotlin Catalin Ghita 20220524 Packt Publishing
Cracking Kotlin Interview: Solutions to Your Basic to Advanced Programming Questions Swati Saxena 04/2020 BPB Publications
Kotlin In-depth [Vol-II]: A comprehensive guide to modern multi-paradigm language Aleksei Sedunov 03/2020 BPB Publications

Publications about Kotlin from Semantic Scholar

title authors year citations influentialCitations
An empirical study on quality of Android applications written in Kotlin language Bruno Góis Mateus and Matias Martinez 2018 26 5
Characterizing the transition to Kotlin of Android apps: a study on F-Droid, Play Store, and GitHub Riccardo Coppola and Luca Ardito and Marco Torchiano 2019 17 3
Are you still smelling it?: A comparative study between Java and Kotlin language Matheus Flauzino and Júlio Veríssimo and Ricardo Terra and Elder Cirilo and Vinicius H. S. Durelli and R. Durelli 2018 16 3
A COMPARATIVE STUDY: JAVA VS KOTLIN PROGRAMMING IN ANDROID APPLICATION DEVELOPMENT Madhurima Banerjee and Subham Bose and A. Kundu and Madhuleena Mukherjee 2018 16 1
On the adoption, usage and evolution of Kotlin features in Android development B. Mateus and Matias Martinez 2019 11 0
Detecting anomalies in Kotlin code T. Bryksin and V. Petukhov and Kirill Smirenko and Nikita Povarov 2018 8 1
Using Large-Scale Anomaly Detection on Code to Improve Kotlin Compiler T. Bryksin and V. Petukhov and Ilya Alexin and Stanislav Prikhodko and A. Shpilman and V. Kovalenko and Nikita Povarov 2020 5 0
ReduKtor: How We Stopped Worrying About Bugs in Kotlin Compiler Daniil Stepanov and M. Akhin and Mikhail A. Belyaev 2019 4 0
Kotlin language for science and Kmath library A. Nozik 2019 4 0
Transitioning to Teaching Android With Kotlin and Jetpack Components A. Esakia 2020 2 1
A Severity-Based Classification Assessment of Code Smells in Kotlin and Java Application Aakanshi Gupta and Nidhi Kumari Chauhan 2021 2 0
Spring Boot with Groovy, Scala, and Kotlin K. Reddy 2017 1 0
How does Migrating to Kotlin Impact the Run-time Efficiency of Android Apps? Michael Peters and Gian Luca Scoccia and I. Malavolta 2021 1 0
Kotlin coroutines: design and implementation Roman Elizarov and Mikhail A. Belyaev and M. Akhin and Ilmir Usmanov 2021 1 0
Why did developers migrate Android Applications from Java to Kotlin Matias Martinez and B. Mateus 2020 1 0
Type-Centric Kotlin Compiler Fuzzing: Preserving Test Program Correctness by Preserving Types Daniil Stepanov and M. Akhin and Mikhail A. Belyaev 2020 1 0
clojure.html · kotlin.html · isbn.html

View source

PLDB - Build the next great programming language · v2022 · Day 31 · Docs · Build · Acknowledgements · Traffic Today · Traffic Trends · Mirrors · GitHub · feedback@pldb.com