Leanpub Header

Skip to main content

Practical Kotlin Deep Dive

Unlocking the 'How' and 'Why' behind Kotlin fundamentals and internal mechanisms.

Takes you from “how to use Kotlin” into “how Kotlin really works,” revealing the internal implementations, desmifying bytecodes and compiler behavior, and internals that shape the language. If you want to write smarter, more confident Kotlin across fundamentals, coroutines, and multiplatform, this is the book that shows you why everything is the way it is.

Hardcover | Paperback | ISBN: 979-8243872744 

$52.99

With Coupon

$34.99

You pay

$34.99

Author earns

$27.99
$

...Or Buy With Credits!

You can get credits with a paid monthly or annual Reader Membership, or you can buy them here.

Buying multiple copies for your team? See below for a discount!

PDF
EPUB
WEB
494
Pages
110,406Words
About

About

About the Book

Practical Kotlin Deep Dive unpacks the “how” and “why” behind Kotlin from core language fundamentals and internal mechanisms to the design of its APIs. It spans Kotlin basics, the standard library, coroutines, kotlinx libraries, compiler internals, and Kotlin Multiplatform.

This book goes beyond surface-level APIs by diving into Kotlin’s internals: it walks through real Kotlin function implementations, demystifies generated bytecode, and explains how the Kotlin compiler interprets the language. It also draws directly from KEEP proposals, JetBrains YouTrack discussions, and compiler source code to connect concepts to their origins and design rationale. The result is an approach that helps you reason about Kotlin instead of simply memorizing APIs.

This progression ensures that you understand not only how to use Kotlin effectively, but also why the language was designed the way it is, giving you insights that translate directly into better code.

For continuous growth, the book includes curated references and additional resources so you can keep exploring beyond its pages. Complex or less common terms are explained with accessible footnotes, making advanced material approachable for newcomers while offering fresh insights to seasoned developers.

The "Pro Tips for Mastery" sections go beneath the surface, covering internal structures of Kotlin functions, algorithms, how the Kotlin compiler behaves, and implementation details that matter in real-world projects. Senior engineers will find thought-provoking details to sharpen their expertise, while mid-level developers gain insights for leveling up their Kotlin knowledge and building a stronger analytical mindset.

Whether you're optimizing performance-critical code, handling complex coroutine tasks, or exploring multiplatform development, this book challenges you to go beyond tutorials. Learn to reason about language design, understand internal mechanisms, and approach Kotlin development with clarity, curiosity, and confidence. You can read previews of Practical Kotlin Deep Dive.

Jaewoong Eum (skydoves)

Team Discounts

Team Discounts

Get a team discount on this book!

  • Up to 3 members

    Minimum price
    $107.00
    Suggested price
    $132.00
  • Up to 5 members

    Minimum price
    $171.00
    Suggested price
    $211.00
  • Up to 10 members

    Minimum price
    $300.00
    Suggested price
    $370.00
  • Up to 15 members

    Minimum price
    $429.00
    Suggested price
    $529.00
  • Up to 25 members

    Minimum price
    $644.00
    Suggested price
    $794.00

Bundle

Bundles that include this book

Author

About the Author

Jaewoong

The author of this book, Jaewoong Eum (known as skydoves), is a Google Developer Expert (GDE) for Android, Kotlin, and Firebase, an open-source developer created over 80+ open-source libraries and projects, collectively amassing 15+ million downloads annually. The author of Manifest Android Interview book and also the founder of Dove Letter—a subscription-based repository dedicated to sharing, learning, and discussing Android and Kotlin development.

Translations

Translations

Testimonials

Reader Testimonials

Contents

Table of Contents

Preface

Testimonial

About This Book

  1. Who This Book Is For
  2. What This Book Covers
  3. How to Use This Book
  4. Staying Current
  5. Issue Reports

Sponsors

  1. CodeRabbit

Chapter 0. Kotlin Language

  1. Q) 0. Explain the null safety in Kotlin
  2. Q) 1. What are the primary roles of the Any, Unit, and Nothing types?
  3. Q) 2. What is a data class, and how does it differ from a regular class?
  4. Q) 3. What is a sealed class and explain the use cases
  5. Q) 4. What is an inner class and what are the differences from a nested class?
  6. Q) 5. When do you use an enum class?
  7. Q) 6. What is a value class?
  8. Q) 7. What is an object and what are the differences from a regular class?
  9. Q) 8. What is a companion object?
  10. Q) 9. What are the differences between var and val?
  11. Q) 10. What are the differences between backing fields and backing properties?
  12. Q) 11. What’s a delegated property?
  13. Q) 12. What are the differences between the lazy delegate and lateinit?
  14. Q) 13. What visibility modifiers exist?
  15. Q) 14. When is the init block invoked, and what are its key characteristics?
  16. Q) 15. What is the higher-order function, and what advantages can you take?
  17. Q) 16. What are the benefits and limitations of an inline keyword?
  18. Q) 17. What’s a reified keyword, and what are the benefits of using it?
  19. Q) 18. How do you use a lambda expression?
  20. Q) 19. What are functional (SAM) interfaces?
  21. Q) 20. What’s extension, and what are its pros and cons?
  22. Q) 21. What are structural equality and referential equality, and how do they differ?
  23. Q) 22. What happens when you run null + null operation?
  24. Q) 23. What is DSL and how can it be utilized?

Chapter 1. Kotlin Standard Library

  1. Q) 24. What collection types exist in Kotlin?
  2. Q) 25. What types of transformation operators are available for collections?
  3. Q) 26. Explain the mechanisms of Iterators
  4. Q) 27. What is a Sequence and its mechanism?
  5. Q) 28. What types of extension functions are available for retrieving parts of a collection?
  6. Q) 29. How do you define the ordering of objects?
  7. Q) 30. What are the scope functions?

Chapter 2. Coroutines

  1. Q) 31. What are Coroutines?
  2. Q) 32. What is a Continuation, and how is it related to a suspend function internally?
  3. Q) 33. What are the differences between coroutines and threads?
  4. Q) 34. What are coroutine builders?
  5. Q) 35. What is a coroutine context?
  6. Q) 36. What is the role of a Job?
  7. Q) 37. What is the purpose of a coroutine scope?
  8. Q) 38. What kind of coroutine dispatchers exist, and what’s their purpose?
  9. Q) 39. What are channels and how do they work?
  10. Q) 40. What are the join() and yield() functions?
  11. Q) 41. How do you handle exceptions in coroutines?
  12. Q) 42. What are the differences between cold flow and hot flow?
  13. Q) 43. Explain the differences between StateFlow and SharedFlow
  14. Q) 44. What does the Flow.flowOn() operator do?
  15. Q) 45. How Flow.buffer() operator works?
  16. Q) 46. How Kotlin’s internal mechanisms optimize Flow with FusibleFlow and ChannelFlow
  17. Q) 47. What are the differences between launchIn(Scope) and Scope.launch()?
  18. Q) 48. What are Flow transformation operators: flatMapLatest, flatMapMerge, flatMapConcat?
  19. Q) 49. What are callbackFlow and channelFlow, and their internal mechanisms?

Chapter 3. KotlinX Libraries

  1. Q) 50. What is kotlinx-serialization and how does it work?
  2. Q) 51. What is kotlinx-datetime and why use it over Java time APIs?
  3. Q) 52. What is kotlinx-collections-immutable and when should you use it?
  4. Q) 53. What other notable KotlinX libraries exist?

Chapter 4. Kotlin Compiler and Plugins

  1. Q) 54. What are annotation processors, KAPT, and KSP?
  2. Q) 55. What is the structure of the Kotlin Compiler?
  3. Q) 56. What is the K2 compiler?
  4. Q) 57. What is FIR (Frontend Intermediate Representation)?
  5. Q) 58. What is IR and how does the Kotlin backend work?
  6. Q) 59. How do you write a Kotlin Compiler Plugin?
  7. Q) 60. What are some real-world Kotlin compiler plugin examples and use cases?

Chapter 5: Kotlin Multiplatform

  1. Q) 61. What is Kotlin Multiplatform?
  2. Q) 62. How does Kotlin Multiplatform handle platform-specific APIs and share the common codes?
  3. Q) 63. What strategies are available for concurrency or asynchronous programming in Kotlin Multiplatform?
  4. Q) 64. What strategies are available for HTTP network communication in Kotlin Multiplatform?
  5. Q) 65. What is Compose Multiplatform?
  6. Q) 66. How are source sets structured in a Kotlin Multiplatform project?
  7. Q) 67. How does Kotlin/Native handle memory management and platform interoperability?
  8. Q) 68. What are the testing strategies in Kotlin Multiplatform?
  9. Q) 69. What are the dependency injection strategies in Kotlin Multiplatform?

Final Words

The Leanpub 60 Day 100% Happiness Guarantee

Within 60 days of purchase you can get a 100% refund on any Leanpub purchase, in two clicks.

Now, this is technically risky for us, since you'll have the book or course files either way. But we're so confident in our products and services, and in our authors and readers, that we're happy to offer a full money back guarantee for everything we sell.

You can only find out how good something is by trying it, and because of our 100% money back guarantee there's literally no risk to do so!

So, there's no reason not to click the Add to Cart button, is there?

See full terms...

Earn $8 on a $10 Purchase, and $16 on a $20 Purchase

We pay 80% royalties on purchases of $7.99 or more, and 80% royalties minus a 50 cent flat fee on purchases between $0.99 and $7.98. You earn $8 on a $10 sale, and $16 on a $20 sale. So, if we sell 5000 non-refunded copies of your book for $20, you'll earn $80,000.

(Yes, some authors have already earned much more than that on Leanpub.)

In fact, authors have earned over $14 million writing, publishing and selling on Leanpub.

Learn more about writing on Leanpub

Free Updates. DRM Free.

If you buy a Leanpub book, you get free updates for as long as the author updates the book! Many authors use Leanpub to publish their books in-progress, while they are writing them. All readers get free updates, regardless of when they bought the book or how much they paid (including free).

Most Leanpub books are available in PDF (for computers) and EPUB (for phones, tablets and Kindle). The formats that a book includes are shown at the top right corner of this page.

Finally, Leanpub books don't have any DRM copy-protection nonsense, so you can easily read them on any supported device.

Learn more about Leanpub's ebook formats and where to read them

Write and Publish on Leanpub

You can use Leanpub to easily write, publish and sell in-progress and completed ebooks and online courses!

Leanpub is a powerful platform for serious authors, combining a simple, elegant writing and publishing workflow with a store focused on selling in-progress ebooks.

Leanpub is a magical typewriter for authors: just write in plain text, and to publish your ebook, just click a button. (Or, if you are producing your ebook your own way, you can even upload your own PDF and/or EPUB files and then publish with one click!) It really is that easy.

Learn more about writing on Leanpub