In this chapter, we've revisited a handful of common software design patterns and seen first hand how Kotlin makes the implementation and utilization of these patterns very easy. We saw how Kotlin provides first-party support for the Singleton pattern through the use of object classes. We explored how to implement the Factory pattern using companion objects. We examined how the use of named arguments and default parameter values enables us to forgo the traditional Builder pattern implementation in favor of simple functions. And finally, we explored how Kotlin's support of higher-order functions simplifies the implementation of the Strategy pattern.
Whether it's the patterns shown in this chapter, or your own favorite design patterns, Kotlin enables developers to reimagine existing patterns or conventions from popular languages such as Java in order to write...