9

Idioms and Anti-Patterns

In the preceding chapters, we explored various aspects of the Kotlin language, delving into the advantages of functional programming and examining concurrent design patterns.

This chapter focuses on the dos and don’ts in Kotlin programming. It aims to help you recognize idiomatic Kotlin code and understand patterns that are best avoided and serves as a compilation of best practices, covering a range of topics discussed earlier.

You might consider some of the content in this chapter simpler compared to the discussions on concurrent data structures and design patterns from the previous two chapters. However, I believe it’s beneficial to address idioms as a unified topic, and to do so, we needed to complete the entire ...

Get Kotlin Design Patterns and Best Practices - Third Edition 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.