Part 2. Embracing Kotlin
By now, you should be very familiar with using Kotlin to access existing APIs. In this part of the book, you’ll learn how to build your own APIs in Kotlin. It’s important to remember that building APIs isn’t restricted to library authors: every time you have two interacting classes in your program, one of them provides an API to the other.
In chapter 7, you’ll learn about the principle of conventions, which are used in Kotlin to implement operator overloading and other abstraction techniques such as delegated properties. Chapter 8 takes a closer look at lambdas, and you’ll see how you can declare your own functions that take lambdas as parameters. You’ll become familiar with Kotlin’s take on some more advanced Java ...
Get Kotlin in Action now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.