Chapter 1: Getting Started with Kotlin
The bulk of this chapter will be dedicated to basic Kotlin syntax. It is important to be comfortable with a language before we start implementing any design patterns in it.
We'll also briefly discuss what problems design patterns solve and why you should use them in Kotlin. This will be helpful to those who are less familiar with the concept of design patterns. But even for experienced engineers, it may provide an interesting perspective.
This chapter doesn't aim to cover the entire language vocabulary but to get you familiar with some basic concepts and idioms. The following chapters will expose you to even more language features as they become relevant to the design patterns that we'll discuss.
In this chapter, we will cover the following main topics:
- Basic language syntax and features
- Understanding Kotlin code structure
- Type system and
null
safety - Reviewing Kotlin data structures
- Control flow
- Working with text and loops
- Classes and inheritance
- Extension functions
- Introduction to design patterns
By the end of this chapter, you'll have a knowledge of Kotlin's basics, which will be the foundation for the following chapters.