Jump to ratings and reviews
Rate this book

Kotlin in Action

Rate this book
Kotlin is a new programming language targeting the Java platform. It offers on expressiveness and safety without compromising simplicity, seamless interoperability with existing Java code, and great tooling support. Because Kotlin generates regular Java bytecode and works together with existing Java libraries and frameworks, it can be used almost everywhere where Java is used today - for server-side development, Android apps, and much more.

Kotlin in Action takes experienced Java developers from the language basics all the way through building applications to run on the JVM and Android devices. Written by core developers of Kotlin, this example-rich book begins by teaching you the basic syntax of the Kotlin language. Then you’ll learn how to use features that let you build reusable abstractions, higher-level functions, libraries, and even entire domain specific languages. Finally, you’ll focus on details of applying Kotlin in real-world projects, such as build system integration, Android support and concurrent programming.

360 pages, ebook

Published May 1, 2016

167 people are currently reading
734 people want to read

About the author

Dmitry Jemerov

2 books9 followers

Ratings & Reviews

What do you think?
Rate this book

Friends & Following

Create a free account to discover what your friends think of this book!

Community Reviews

5 stars
304 (51%)
4 stars
240 (40%)
3 stars
42 (7%)
2 stars
7 (1%)
1 star
1 (<1%)
Displaying 1 - 30 of 59 reviews
Profile Image for Regis Hattori.
147 reviews12 followers
August 7, 2020
Very complete, focused on its differences compared to other languages not just in terms of syntax but also in terms of patterns. Because it was written by one of the designers of the language is very useful because he explains the decisions they made and you can understand the "why"s.

In the Generics chapter, there is the better explanation I ever read about invariants, covariants, and contravariants.

DSL chapter is very useful to understand how the majority of Kotlin libs work. It is much better than DSL chapter of Pragmatic Ruby. And it makes much more sense to use a static typing language for internal DSLs.

I think this is not a book for you if Kotlin is your first language and some parts will be more useful if you have a Java background.
Profile Image for Wang Zirui.
3 reviews
November 3, 2018
I don't like the book. It keeps saying Java is bad. I was trained in Java and I don't think the authors are making the right points. Java is a great language in my opinion, while Kotlin looks more like a bunch of ad hoc ideas. It's less elegant than Java. But the fact is that my colleagues are using Kotlin and I have to learn it. I'm looking for a better book that shows basic respect for Java.
Profile Image for Vlad Buruian.
1 review
January 26, 2024
Good book. Covers almost all kotlin lang basics in a well explained examples.
Profile Image for Andrei Catinean.
6 reviews4 followers
October 21, 2016
Great book for anyone who wants to start grasping Kotlin. Goes from basic knowledge and use cases to rather complex ones towards the end.

There is a fair assumption that you are familiar with Java, as the book does not cover basic Java or object oriented programming explanations.
Profile Image for Mark Nenadov.
805 reviews44 followers
February 21, 2018
This book takes an excellent approach to teaching the Kotlin language and I highly recommend it to anyone who wants to dive into it. I enjoyed the way it is contrasted and compared to Java. I did find the sledding to be slow towards the end, though.
Profile Image for Jan Jaap.
518 reviews8 followers
reference
August 12, 2022
Today (2022 0812 th) I found this title on عابد فتال .

https://www.simonandschuster.com/book... bookpage publisher

Table of Contents

PART 1 - INTRODUCING KOTLIN
Kotlin: what and why
Kotlin basics
Defining and calling functions
Classes, objects, and interfaces
Programming with lambdas
The Kotlin type system
PART 2 - EMBRACING KOTLIN
Operator overloading and other conventions
Higher-order functions: lambdas as parameters and return values
Generics
Annotations and reflection
DSL construction
Profile Image for Illia.
210 reviews4 followers
July 18, 2022
Better than Java but still far away from being a nice to use language.
6 reviews
September 24, 2017
I really enjoyed the way the book is written.
The authors found out a way to present the cool Kotlin features to make them easy to grasp.
The only thing that I found out quite hard to keep the pace with was the last part in the kotlin reflection (json parsing and object deserialization).
I am already looking forward to seeing the 2nd version of Kotlin in Action - including probably the kotlin coroutines, KJS.
112 reviews5 followers
July 11, 2020
Excellent book to get into Kotlin essentials. Please note this is not a hands-on book that guides you through the language using exercises and examples. Mostly of the contents are theory on the
Logical programming of Kotlin (authors are part of team behind JetBrains).

Good resource as a jumpstart from Java to Kotlin.
Profile Image for Mingwei Zhang.
10 reviews1 follower
July 13, 2017
It is a very good introductory book on Kotlin. I would recommend anyone with some Java background to read it and try out Kotlin.
Profile Image for Venkatesh-Prasad.
223 reviews
July 23, 2018
This should be your first Kotlin book provided you have a good grasp programming concepts.

It is a brisk, no-nonsense, and pretty exhaustive coverage of the features of Kotlin. Unlike programming books that introduce a new language, this book does not go over the basics concepts of OO. Instead, it assumes you know your programming concepts (at least OO) and starts by describing how they are supported in Kotlin. For concepts common to Java, the book 1) briskly describes the concept as it occurs in Kotlin while tying to its Java counterpart (to ease the transition) and 2) then dives into nuances and enhancements that are available only in Kotlin. As for FP concepts and the concepts unique to Kotlin, the authors provide a gradual introduction followed by reasonable deep dives into nuances and pros/cons. The exposition is accompanied by numerous **small** examples, which expedites reading the book (no flipping back and forth to read thru multi-page examples).

Having programmed in both OOP and FP languages, the book was a quick read. The "Try Online" site (https://try.kotlinlang.org/) helped poke some corner cases while reading the book. And, it was fun tweeting about Ahas and Gotchas about Kotlin :) https://twitter.com/orderwithchaos/st...
Profile Image for Ivar.
35 reviews1 follower
January 15, 2020
Loved it. I’ve worked with Java and Groovy for years and some time ago started Kotlin. Book gave me insights into concepts that I kind of used but did not understand them thoroughly.
Useful bits for me:
- objects are for singleton use
- extension functions are a thing, the ones with receiver types are useful in DSLs, also extension functions can be defined inside of a class
- generics, variance - now its clear what those “in” an “out” next to generic types mean
- operator overloading is something I’d love to do more now,
- delegation using “by”
- infix, inline functions is something I’ll try next
- Kotlin reflection was insightful
- have to mention data classes and generated code although I was aware of those as they are one of main selling points

The whole book was sort of surprise as it mostly contains no nonsense stuff you want to know.

One important thing I missed in this book was coroutines though.

I’ll keep this book on my desk for reference now, recommend for those starting to work with the language.
Profile Image for Wouter.
Author 2 books29 followers
August 3, 2021
An excellent and quite complete introduction into Kotlin for experienced Java developers. The book emphasizes on the reason why things are in Kotlin as they are, and how the Kotlin compilers generates bytecode compared to the manual plumbing you'd have to go through in order for a typical Java class to do the same. This is highly useful for me as a Java dev, as after a few decompilation attempts and reading this book, the language "clicked".
The only downside, as with all these modern technological tools: the book is from 2017, and could do with a revision, as Kotlin is already v1.5+, although compared to the Go books which have to rework entire chapters because of the introduction of generics, reading up on the latest fluff on a website will more than do.
Profile Image for Piotr Kalinowski.
53 reviews22 followers
May 21, 2017
Very no-nonsense and straightforward presentation style tailored for experienced programmers. I didn't feel like I have to skip through most of the book. It really focused on introducing new JVM language instead of teaching programming.

I liked how it took the time to explain a few implementation details, so that the reader could immediately understand how various language features interact with Java. But the authors didn't stop at that and also included some notes on how performance may be affected, where applicable. As a developer that started with C as a child and works professionally with resource constrained mobile platforms, I highly appreciated those details.
Profile Image for Elliot.
39 reviews4 followers
January 23, 2020
An excellent book for developers to know more about Kotlin. It assumes some Java experience for the readers. If you haven't already known some Kotlin before, I'd say this book is perfect for you to get started.

I already knew some Kotlin and would like to delve more into the advanced topics. So I skimmed through the first half of the book which is the foundations and focused on the second half explaining the type system, lambda, DSL, reflections of Kotlin.

Overall I found the author explaining with clarity and structure, a style I absolutely enjoyed. Some topics are left to be desired, such as Kotlin Native, coroutines, and metaprogramming.
Profile Image for Marcos Trujillo.
32 reviews4 followers
December 26, 2017
This is the perfect book to learn Kotlin (if you have already experience programming, of course)
It's a trip to understand almost all the features kotlin has, inciting not only in the well know features like nullability or Higher order functions, also in the core parts of kotlin and, more important, in the whys and hows.
With this book you have also access to a complete set of exercices and examples similar to Kotlin Koans.

If you are planing to develop in Kotlin this is your book.

4 reviews
January 29, 2022
An incredibly well-written book on Kotlin. To me, this sets the high bar on how books on programming languages are supposed to be written: it provides in-depth reasoning on the design decisions, how things work under the hood, and a lot of concrete and succinct examples that you can try yourselves. And lastly, contrary to claims from previous reviews that this book bashes Java: I don't find it to be true; the authors simply provide details on how the two languages interoperate.
Profile Image for Beka Modebadze.
5 reviews1 follower
September 13, 2022
KIA is a great book for Java developers who want to make a smooth transition into Kotlin. The language used in this book is simple and straightforward. It does a good job of demonstrating where Kotlin improved over Java and teaches a dogmatic way of writing code. It also prepares you to make a mental switch from Java when programming in Kotlin.

If you have some experience with Java and want to upgrade, this book is for you
Profile Image for Denis Nuțiu.
62 reviews5 followers
February 17, 2024
Kotlin in Action second edition is a must read if you want to learn Kotlin and some standard libraries and practice. I've read other books about Kotlin that only taught me the language features without diving deep into concurrency, DSL and other patterns and techniques built into the language.

This book was more useful for me now that I know how concurrency is handled in Kotlin and a little about how Jetpack Compose is build.
Profile Image for Yamir Encarnacion.
21 reviews3 followers
February 9, 2019
This is a great book to learn Kotlin if you already know Java. If you do not know Java, many things will probably be confusing. The books starts off with the basics and works its way towards more advanced topics.

Also, it is a lot to take in from one reading. Myself, I expect to re-read this book.
59 reviews2 followers
February 13, 2019
Excellent overview of the Kotlin programming language. Starts with the fundamentals and works up to higher level constructs at a great pace. I found the chapter on DSLs most useful. It illustrates the power of lambdas with receivers and extension functions and should further help you understand Kotlin DSLs in the wild.
Profile Image for Dmytro Chasovskyi.
89 reviews
October 31, 2019
As the book states, it will work the best for those who want to see Kotlin features and move from other JVM-based languages like Java.

I definitely recommend it for people who consider switching to Kotlin but beware that it is not easy and relaxed reading. I found it hard to understand some ideas the way they described here.
105 reviews3 followers
November 26, 2021
Gets much denser near the end, but a good introduction that will have you productive quickly. Assumes you are already pretty familiar with Java, but not hard o understand if you aren't, as long as you've worked with other OO languages (in fact one gets the impression that C# influenced Kotlin a great deal).
1 review
May 23, 2022
Unless you are an advanced Java Developer ,this book Should not be your first to learn Kotlin, especially if you are a beginner!
also the provided examples are complexe and could be way simple to present the language capability
I recommend this book only for Generics chapter, which is well explained
Profile Image for Ian Wagner.
70 reviews3 followers
September 18, 2021
Solid intro to Kotlin from some of the core team. It’s a bit dated now, but this is good foundational reading that can be updated by other sources such as the official release notes. I rated 4 stars instead of 5 since it wasn’t the best written programming book ever, but it does the job ;)
Profile Image for Christoph Kappel.
463 reviews9 followers
December 11, 2023
This is still in MEAP, so more is to come and for me it was a good primer for my start with Kotlin. It provides a deep dive into the different concepts and provides easy to understand examples.

Overall I highly recommend it as a starter.
Profile Image for Justin.
199 reviews44 followers
January 4, 2018
Not very engaging but it will give you a grasp of some deep Kotlin concepts if you don't fall asleep first.
Displaying 1 - 30 of 59 reviews

Can't find what you're looking for?

Get help and learn more about the design.