Summary
In this chapter, we explored different programming paradigms that are supported by Kotlin. We compared imperative programming and declarative programming and examined both the object-oriented and functional programming paradigms. Kotlin supports, but does not enforce, all of these programming paradigms along with other models of programming, such as generic and reactive programming. Kotlin aims to provide support and make it convenient to write code in whichever way works best for you.
Kotlin has support for classes, interfaces, and other common OOP language features; in addition to strongly enforcing OOP principles such as encapsulation. Kotlin supports first-class functions and higher-order functions, and provides a rich Standard ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access